Skip to main content

Making Docker see NVIDIA GPUs on Linux

 

 


Fedora Linux:

Run sudo dnf install nvidia-container-toolkit nvidia-driver to install NVIDIA's toolkit for interacting with containers, as well as the proprietary drivers for your NVIDIA GPU.

sudo nvidia-ctk runtime configure --runtime=docker configures Docker to be able to use the GPU.

sudo systemctl restart docker restarts the Docker service.

docker info | grep Runtimes checks if Docker can see the "nvidia" runtime.