How to install required NVIDIA Drivers and NVIDIA Containter Toolkit short instructions. Full version of this is available here: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
This instruction will work if you are using APT. Otherwise, follow the instructions above.
Run sudo systemctl restart docker
. If this command fails, reinstall Docker following instruction for your distro here: https://docs.docker.com/engine/install/
Drivers
- Run
sudo ubuntu-drivers install --gpgpu
- Run
sudo apt update
- Run
sudo apt install nvidia-driver firmware-misc-nonfree
- Run
sudo add-apt-repository ppa:graphics-drivers/ppa
- Run
sudo apt update
- Run
sudo apt install nvidia-driver-555
Use .run
from here: https://www.nvidia.com/Download/index.aspx?lang=en-us
Or follow the instructions: https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html
Nvidia Container Toolkit
Run those commands:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker