DockerThe GPU is not being used
Docker: could not select device driver with [[gpu]]
The message
could not select device driver "" with capabilities: [[gpu]]
What it means
Docker was asked for a GPU (--gpus all) but has no GPU driver registered. On NVIDIA it comes from the NVIDIA Container Toolkit, missing or unconfigured.
Why it happens
- The NVIDIA Container Toolkit is not installed on the host.
- It is installed, but Docker was not configured to use it or not restarted afterwards.
- The card is AMD:
--gpusis NVIDIA-only.
How to fix it
- Install the NVIDIA Container Toolkit, then
sudo nvidia-ctk runtime configure --runtime=dockerandsudo systemctl restart docker. - Check with
docker run --rm --gpus all ubuntu nvidia-smi. - On AMD, drop
--gpusand pass the devices instead:--device /dev/kfd --device /dev/dri, with a ROCm image.
Guides that cover this
Related errors
Checked against
Message text read from source on 2026-10-26.