下載nvidia-docker2的rpm包

如今慢慢進入GPU的世界,git

參考安裝URL:github

https://github.com/NVIDIA/nvidia-dockerdocker

# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f sudo yum remove nvidia-docker # Add the package repositories distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | \
  sudo tee /etc/yum.repos.d/nvidia-docker.repo # Install nvidia-docker2 and reload the Docker daemon configuration sudo yum install -y nvidia-docker2 sudo pkill -SIGHUP dockerd # Test nvidia-smi with the latest official CUDA image docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi

若是在centos和redhat之間切換,就要靈活定義distribution變量了。centos

~~~~~~~~~~~~~~~~~~~~~~~~~curl

第一步,先安裝nvidia-docker2吧。url

因爲公司特殊狀況,手工下載rpm。spa

如今nvidia-docker2默認支持的是比較新的18.09.6的docker-ce版本。code

先安裝好這個版本以後,再使用yum downloadonly命令,下載全部的rpm包。blog

yum install --downloadonly nvidia-docker2 --downloaddir=/tmp/nvidia

輸出以下:ci

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package nvidia-docker2.noarch 0:2.0.3-3.docker18.09.6.ce will be installed --> Processing Dependency: nvidia-container-runtime = 2.0.0-3.docker18.09.6 for package: nvidia-docker2-2.0.3-3.docker18.09.6.ce.noarch --> Running transaction check ---> Package nvidia-container-runtime.x86_64 0:2.0.0-3.docker18.09.6 will be installed --> Processing Dependency: nvidia-container-runtime-hook < 2.0.0 for package: nvidia-container-runtime-2.0.0-3.docker18.09.6.x86_64 --> Running transaction check ---> Package nvidia-container-runtime-hook.x86_64 0:1.4.0-2 will be installed --> Processing Dependency: libnvidia-container-tools < 2.0.0 for package: nvidia-container-runtime-hook-1.4.0-2.x86_64 --> Processing Dependency: libnvidia-container-tools >= 0.1.0 for package: nvidia-container-runtime-hook-1.4.0-2.x86_64 --> Running transaction check ---> Package libnvidia-container-tools.x86_64 0:1.0.2-1 will be installed --> Processing Dependency: libnvidia-container1(x86-64) >= 1.0.2-1 for package: libnvidia-container-tools-1.0.2-1.x86_64 --> Processing Dependency: libnvidia-container.so.1(NVC_1.0)(64bit) for package: libnvidia-container-tools-1.0.2-1.x86_64 --> Processing Dependency: libnvidia-container.so.1()(64bit) for package: libnvidia-container-tools-1.0.2-1.x86_64 --> Running transaction check ---> Package libnvidia-container1.x86_64 0:1.0.2-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ===================================================================================================================================================================== Package Arch Version Repository Size ===================================================================================================================================================================== Installing: nvidia-docker2                                 noarch                  2.0.3-3.docker18.09.6.ce                     nvidia-docker                             4.7 k Installing for dependencies: libnvidia-container-tools                      x86_64                  1.0.2-1                                      libnvidia-container                        33 k libnvidia-container1                           x86_64                  1.0.2-1                                      libnvidia-container                        74 k nvidia-container-runtime                       x86_64                  2.0.0-3.docker18.09.6                        nvidia-container-runtime                  2.7 M nvidia-container-runtime-hook                  x86_64                  1.4.0-2                                      nvidia-container-runtime                  616 k Transaction Summary ===================================================================================================================================================================== Install 1 Package (+4 Dependent packages) Total size: 3.4 M Installed size: 13 M Background downloading packages, then exiting: exiting because "Download Only" specified

 

-rw-r--r-- 1 root root 23217684 May 29 10:23 containerd.io-1.2.5-3.1.el7.x86_64.rpm -rw-r--r-- 1 root root 19628160 May 29 10:21 docker-ce-18.09.6-3.el7.x86_64.rpm -rw-r--r-- 1 root root 14689460 May 29 10:21 docker-ce-cli-18.09.6-3.el7.x86_64.rpm -rw-r--r-- 1 root root    75516 Mar 26 12:00 libnvidia-container1-1.0.2-1.x86_64.rpm -rw-r--r-- 1 root root    33688 Mar 26 12:00 libnvidia-container-tools-1.0.2-1.x86_64.rpm -rw-r--r-- 1 root root  2821452 May 17 05:53 nvidia-container-runtime-2.0.0-3.docker18.09.6.x86_64.rpm -rw-r--r-- 1 root root   630948 May 17 05:53 nvidia-container-runtime-hook-1.4.0-2.x86_64.rpm -rw-r--r-- 1 root root     4796 May 17 05:54 nvidia-docker2-2.0.3-3.docker18.09.6.ce.noarch.rpm
相關文章
相關標籤/搜索