You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo docker run --rm --device nvidia.com/gpu=all --security-opt=label=disable ubuntu nvidia-smi -L
Result:
$ sudo docker run --rm --device nvidia.com/gpu=all --security-opt=label=disable ubuntu nvidia-smi -L
[sudo] password for collin:
docker: Error response from daemon: could not selectdevice driver "cdi" with capabilities: [].
Expected behavior
nvidia-smi prints gpu
If the same command above is run with podman, it correctly prints the GPU.
Good news! I was able to reproduce your issue (thank you for the detailed description @collinarnett!), and I can also confirm that adding the following to my NixOS configuration fixed it:
Describe the bug
Cannot run nvidia compatable containers with docker 25 and virtualisation.containers.cdi.dynamic.nvidia.enable = true;
Steps To Reproduce
Steps to reproduce the behavior:
Enable the following
Run the following command:
Result:
Expected behavior
nvidia-smi prints gpu
If the same command above is run with podman, it correctly prints the GPU.
Additional context
My use case revolves around using this feature in docker compose:
https://docs.docker.com/compose/gpu-support/
I am running this GPU via PCIE passthrough on a libvirt qemu vm if that's relevant.
Notify maintainers
@SomeoneSerge
@ereslibre
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: