Docker运行GPU环境
安装Nvidia-container-runtime
官网地址:nvidia-container-runtime
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt update
sudo apt nvidia-container-runtime
docker pull nvidia/cuda:10.0-base-ubuntu16.04
docker run -it --gpus all nvidia/cuda:10.0-base-ubuntu16.04 bash
root@ffa65b6430a4:/