Ubuntu18 安装nvidia-Docker

复制下面的代码到终端:

curl https://get.docker.com | sh

sudo systemctl start docker && sudo systemctl enable docker

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)

curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -

curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

curl -s -L https://nvidia.github.io/nvidia-container-runtime/experimental/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list

sudo apt-get update

sudo apt-get install -y nvidia-docker2

sudo systemctl restart docker

sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

参考链接:https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker

了解更多关于《计算机视觉与图形学》相关知识,请关注公众号:

在这里插入图片描述
下载我们视频中代码和相关讲义,请在公众号回复:计算机视觉课程资料

你可能感兴趣的:(Ubuntu18,nvidia-docker)