Before install nvidia-docker
, you will need these first:
Then download these file:
- libnvidia-container1_1.3.0-1_amd64.deb
- libnvidia-container-tools_1.3.0-1_amd64.deb
- nvidia-container-runtime_3.4.0-1_amd64.deb
- nvidia-container-toolkit_1.3.0-1_amd64.deb
- nvidia-docker2_2.5.0-1_all.deb
Install them one by one:
# Install nvidia
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo dpkg -i cuda-repo-ubuntu1804-11-2-local_11.2.0-460.27.04-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu1804-11-2-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
# Install docker offline
sudo dpkg -i docker-ce-cli_18.09.9~3-0~ubuntu-xenial_arm64.deb
# Install nvidia docker
sudo dpkg -i libnvidia-container1_1.3.0-1_amd64.deb
sudo dpkg -i libnvidia-container-tools_1.3.0-1_amd64.deb
sudo dpkg -i nvidia-container-toolkit_1.3.0-1_amd64.deb
sudo dpkg -i nvidia-container-runtime_3.4.0-1_amd64.deb
sudo dpkg -i nvidia-docker2_2.5.0-1_all.deb
Then restart docker:
sudo systemctl restart docker
And this should work now ;)):
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
(Please note that you have to docker save ... | gzip > .tar.gz -> docker load -i .tar.gz -> copy locally -> run for the nvidia/cuda:11.0-base image)
This same instruction can be apply for different Linux distribution and (or) arch. You just need to choose the suitable file.
I will update for RHEL7.7 later
Hey there please check it out for the link you provide should be in AMD64, but the LINK is for ARM64. Thanks