Hi,
I tried to run a docker image with gpu. However, I got this error:
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
I installed CachyOS with the default Nvidia open driver. nvidia-smi
works on the terminal:
nvidia-smi
Sun Jan 5 12:36:35 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77 Driver Version: 565.77 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4060 ... Off | 00000000:01:00.0 On | N/A |
| N/A 43C P5 5W / 75W | 881MiB / 8188MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
I can reproduce the error by running this base nvidia docker image that also returns the same error:
docker run --rm --gpus all nvidia/cuda:12.6.3-base-ubuntu24.04 nvidia-smi