Created
February 26, 2021 00:51
-
-
Save bitnom/f1b871f75e326c76397daa14c302eb02 to your computer and use it in GitHub Desktop.
install nvidia docker on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
curl -s -L https://nvidia.github.io/nvidia-container-runtime/experimental/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list | |
sudo apt-get update | |
sudo apt-get install -y nvidia-docker2 | |
sudo systemctl restart docker | |
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment