KiaraGrouwstra / nix-config

my NixOS configuration
15 stars 1 forks source link

nvidia-docker: Unknown runtime specified nvidia #101

Closed KiaraGrouwstra closed 5 years ago

KiaraGrouwstra commented 5 years ago
$ 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
KiaraGrouwstra commented 5 years ago

obviously that gives me no hits... I may wanna ask at https://github.com/NixOS/nixpkgs/pull/51733 or file an issue.

KiaraGrouwstra commented 5 years ago

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

KiaraGrouwstra commented 5 years ago

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
Yorwba commented 5 years ago

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;
  };
KiaraGrouwstra commented 5 years ago

That's awesome, thank you! :grin:

tscholak commented 4 years ago

I just ran into this problem. Small world.