1.安装NVIDIA显卡驱动
略(这一步有很多很好的教程了)
2.安装NVIDIA Docker
(该步骤主要参考NVIDIA官方教程)
使用国内镜像一键安装Docker
curl https://get.daocloud.io/docker | sh
设置NVIDIA Container Toolkit的稳定版仓库和GPU key
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
更新系统仓库并安装NVIDIA Docker
sudo apt-get update
sudo apt-get install -y nvidia-docker2
重启Docker
sudo syatemctl restart docker
<