Ubuntu 安装 nvidia-docker2
at 7个月前 ca NVIDIA pv 618 by touch
1. 安装Dokcer-CE
curl https://get.docker.com | sh \ && sudo systemctl --now enable docker
2. 安装NVIDIA Container Toolkit
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
3. 安装nvidia-docker2包及其依赖
sudo apt-get update sudo apt-get install -y nvidia-docker2
4. 修改镜像源
sudo vim /etc/docker/daemon.json
{ "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] } }, "registry-mirrors": [ "https://registry.docker-cn.com", "https://ckdhnbk9.mirror.aliyuncs.com" ] }
5. 安装 docker compose
curl -SL https://github.com/docker/compose/releases/download/1.27.4/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
版权声明
本文仅代表作者观点,不代表码农殇立场。
本文系作者授权码农殇发表,未经许可,不得转载。
已有0条评论