Ubuntu离线安装docker和nvidia-docker
安装 docker 20.10.17
查看Ubuntu操作系统版本的详细信息,不同的版本所依赖的deb不同。
lsb_release -a
Codename为:bionic
推荐下载地址:https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/
如果是其他的Codename,可通过https://download.docker.com/linux/ubuntu/dists/查找
下载安装包:
- containerd.io_1.6.6-1_amd64.deb
- docker-ce_20.10.173-0ubuntu-bionic_amd64.deb
- docker-ce-cli_20.10.173-0ubuntu-bionic_amd64.deb
- docker-ce-rootless-extras_20.10.173-0ubuntu-bionic_amd64.deb
使用root执行命令:
dpkg -i ./*deb
重启docker服务:
systemctl daemon-reload
systemctl restart docker
验证
docker -v
docker version
安装 nvidia-docker 和 nvidia-container-toolkit
下载安装包:
- libnvidia-container1_1.9.0-1_amd64.deb
- libnvidia-container-tools_1.9.0-1_amd64.deb
- nvidia-docker2_2.9.1-1_all.deb
- nvidia-container-runtime_3.9.0-1_all.deb
- nvidia-container-toolkit_1.9.0-1_amd64.deb
推荐下载地址:https://mirror.cs.uchicago.edu/nvidia-docker/libnvidia-container/stable/ubuntu18.04/amd64/。
如果是其他的版本,可通过https://mirror.cs.uchicago.edu/nvidia-docker/libnvidia-container/stable/查找。
使用root执行命令:
dpkg -i ./lib* ./nvidia*
重启docker服务:
systemctl daemon-reload
systemctl restart docker
验证
nvidia-docker -v
nvidia-docker version