Nvidia-docker
The description in the project mentions: Build and run Docker containers leveraging NVIDIA GPUs, a collection of open source project commands created to better provide a set of GPU services based on the NVIDIA chip.
Project address: Https://github.com/NVIDIA/nvidia-docker Docker vs Nvidia-docker
Docker is hardware-independent and platform-independent, but when using the NVIDIA GPU, you need to rely on Nvidia-driver to install Nvidia driver into container, but the Nvidia in container The driver version is similar to the host host version, so it does not conform to Docker's platform-independent hardware-independent features.
The current Nvidia-docker solution is to not install Nvidia driver in image, but to start container by mounting driver files or specifying specific hardware when starting container. Install front
Distribution= (./etc/os−release;echo (./e t c/o s−r E l e a S E; e c h o (./etc/os-release;echo id$version_id)
Set the environment variable; in CentOS 7, the distribution value is: CENTOS7
Curl-s-L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | \
sudo tee/etc/yum.repos.d/nvidia-docker.repo
The result output of the program execution is:
[Libnvidia-container]
Name=libnvidia-container
baseurl=https://nvidia.github.io/libnvidia-container/centos7/$basearch
repo_ Gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://nvidia.github.io/libnvidia-container/gpgkey
Sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
[nvidia-container-runtime]
name= Nvidia-container-runtime
baseurl=https://nvidia.github.io/nvidia-container-runtime/centos7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://nvidia.github.io/ Nvidia-container-runtime/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
[ Nvidia-docker]
name=nvidia-docker
baseurl=https://nvidia.github.io/nvidia-docker/centos7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
Gpgkey=https://nvidia.github.io/nvidia-docker/gpgkey
Sslverify=1
SSLCACERT=/ETC/PKI/TLS/CERTS/CA-BUNDLE.CRT
Installation Instructions
Yum Search Nvidia-docker
The result of the command execution output is:
Loaded Plugins:fastestmirror, LangPacks libnvidia-container/x86_64/signature |
455 B 00:00:00 Retrieving key from Https://nvidia.github.io/libnvidia-container/gpgkey importing GPG key 0xf796ecb0: Userid: "NVIDIA CORPORATION (Open Source Projects) <cudatools@nvidia.com>" fingerprint:c95b 321b 61e8 8c18 09C4 f759 ddca e044 f796 ecb0 From:https://nvidia.github.io/libnvidia-container/gpgkey is this OK [y/n]: y Libnvi Dia-container/x86_64/signature |
2.0 KB 00:00:07!!! Nvidia-container-runtime/x86_64/signature | 455 B 00:00:00 Retrieving key from Https://nvidia.github.io/nvidia-container-runtime/gpgkey importing GPG key 0xf796 Ecb0:userid: "NVIDIA CORPORATION (Open Source Projects) <cudatools@nvidia.com>" fingerprint:c95b 321b 61e8 8c18 09c4 f759 ddca e044 f796 ecb0 from:https://nvidia.github.io/nvidia-container-runtime/gpgkey are this ok [y/n] : Y nvidia-container-runtime/x86_64/signature |
2.0 KB 00:00:02!!! Nvidia-docker/x86_64/signature | 455 B 00:00:00 Retrieving key from Https://nvidia.github.io/nvidia-docker/gpgkey importing GPG key 0xf796eCb0:userid: "NVIDIA CORPORATION (Open Source Projects) <cudatools@nvidia.com>" fingerprint:c95b 321b 61e8 8 C18 09c4 f759 ddca e044 f796 ecb0 from:https://nvidia.github.io/nvidia-docker/gpgkey are this OK [y/n]: y nvidia-d Ocker/x86_64/signature |
2.0 KB 00:00:04!!! (1/3): libnvidia-container/x86_64/primary | 3.5 KB 00:00:01 (2/3): Nvidia-docker/x86_64/primary | 4.0 KB 00:00:02 (3/3): Nvidia-container-runtime/x86_64/primary | 4.3 KB 00:00:08 Loading mirror speeds from cached Hostfile * base:mirrors.tuna.tsinghua.edu.cn * epel:mirrors.tu na.tsinghua.edu.cn * extras:mirrors.tuna.tsinghua.edu.cn * updates:mirrors.aliyun.com Libnvidia-container 20/20 Nvidia-container-runtime 29/29 Nvidia-docker 29/29 =============================================== ======================================================== N/S Matched:nvidia-docker ============================== ========================================================================== Nvidia-docker2.noarch:nvidia-docker CLI wrapper Nvidia-docker.x86_64:nvidia Docker container tools Name and summary only-use ' Search all ' for EV Erything.
Yum Install nvidia-docker start service
Systemctl Start Nvidia-docker
Systemctl Status Nvidia-docker
If the Nvidia-docker service is not started, it is easy to create the following problems:
Docker:error response from Daemon:create nvidia_driver_390.30:create nvidia_driver_390.30:error looking up volume plug In Nvidia-docker:legacy plugin:plugin not found.
Summary
Reference Information
"1" Installation Guide https://github.com/nvidia/nvidia-docker/wiki/installation-(version-2.0)
"2" Installation front instructions https://nvidia.github.io/nvidia-docker/