KiaraGrouwstra/nix-config

nvidia-docker: Unknown runtime specified nvidia

Closed this issue · 6 comments

$ docker pull mapd/mapd-ce-cuda
$ docker run --runtime=nvidia -d --name mapd -p 9091-9092:9091-9092 -v /home/username/mapd-storage:/mapd-storage mapd/mapd-ce-cuda
Error response from daemon: Unknown runtime specified nvidia

obviously that gives me no hits... I may wanna ask at NixOS/nixpkgs#51733 or file an issue.

I get this error also using the invocation nvidia-docker run ....

alternative repro for pytorch:

docker pull nvcr.io/nvidia/pytorch:19.03-py3
nvidia-docker run -ti --rm -v $PWD:/app nvcr.io/nvidia/pytorch:19.03-py3 python

Hi, I found this issue while searching for the exact same Unknown runtime specified nvidia error message. There's an option virtualisation.docker.enableNvidia that is required to register the nvidia runtime with the docker daemon.

Adding the code below to my configuration.nix solved the problem for me:

  hardware.opengl.driSupport32Bit = true; # Precondition for enableNvidia below
  virtualisation.docker = {
    enable = true;
    enableNvidia = true;
  };

That's awesome, thank you! 😁

I just ran into this problem. Small world.