Nvidia Docker Container Toolkit


For installing the Nvidia Docker Container Toolkit, you first need to add the corresponding repository (“PPA”) to the package sources, update it, and then start the installation:

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 update
sudo apt install -y nvidia-container-toolkit

After that, the container runtime needs to be configured:

sudo nvidia-ctk runtime configure --runtime=docker

and finally, the Docker service needs to be restarted:

sudo systemctl restart docker