环境
说明:
深度apt 源中无法直接安装nvidia-docker
下载源码
github地址:
GitHub - NVIDIA/nvidia-docker: Build and run Docker containers leveraging NVIDIA GPUs
下载最新release
https://github.com/NVIDIA/nvidia-docker/archive/refs/tags/v2.13.0.tar.gz
编译
tar -xvf nvidia-docker-2.13.0.tar.gz
cd nvidia-docker-2.13.0
使用国内源
新建文件:ubuntu20.04.sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
修改dockerfile,新增一行
为节约时间,只编译ubuntu20.04版本
make
make LIB_VERSION=2.13.0 LIB_TAG=nvidia-docker TOOLKIT_VERSION=2.13.0 TOOLKIT_TAG=nvidia-docker
输出
安装(失败)
nvidia-container-toolkit
https://github.com/NVIDIA/nvidia-container-toolkit/archive/refs/tags/v1.13.1.tar.gz
同样的操作,只编译ubuntu20.04
再次安装
未安装软件包 libnvidia-container-tools
libnvidia-container
https://github.com/NVIDIA/libnvidia-container/archive/refs/tags/v1.13.1.tar.gz
git clone --depth=1 https://github.com/NVIDIA/libnvidia-container
失败