22nd CCP PET-MR sftwr frmwrk mtng
Casper O. da Costa-Luis
Biomed. Eng. & Im. Sci.
KCL, St Thomas' Hospital, London SE1 7EH
cuFFT
, cuBLAS
, cuDNN
nvcc
compiler)cudaSetDevice(1); // sets current GPU to #2
cudaMemcpyPeerAsync()
cudaDeviceEnablePeerAccess();
cudaDeviceCanAccessPeer();
all-gather
, all-reduce
, broadcast
, reduce
, reduce-scatter
https://github.com/CCPPETMR/SIRF/wiki/SIRF-SuperBuild-on-Docker
docker-compose up --no-start sirf
docker start -ai sirf
Possibility to get CUDA support within the container
/dev/nvidia*
!Explicit instructions for:
cuDNN
, NCCL
, ...) https://developer.nvidia.com/$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo ubuntu-drivers autoinstall
# Assuming 9.0 (9.2+ not yet supported by e.g. `tensorflow`)
$ wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
$ sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
$ sudo apt-key adv --fetch-keys \
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
$ sudo apt-get update
$ sudo apt-get install cuda-9-0
docker
nvidia-docker
https://github.com/NVIDIA/nvidia-docker/Install docker
https://docs.docker.com/install/linux/docker-ce/ubuntu/
$ curl -fsSL \
https://download.docker.com/linux/ubuntu/gpg | \
sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce
nvidia-docker
https://github.com/NVIDIA/nvidia-docker/# Add the package repositories
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo apt-key add -
dist=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L \
https://nvidia.github.io/nvidia-docker/$dist/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
# Install nvidia-docker2 and reload the Docker daemon configuration
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
# Download image complete with CUDA toolkit and cuDNN from NGC
$ docker pull nvcr.io/nvidia/cuda:9.0-cudnn7.2-devel-ubuntu16.04
# Alias
$ docker tag nvcr.io/nvidia/cuda:9.0-cudnn7.2-devel-ubuntu16.04 \
nvidia/cu90dnn72
# Test `nvidia-smi`
$ docker run --runtime=nvidia --rm nvidia/cu90dnn72 nvidia-smi