could not select device driver "" with capabilities: [[gpu]].

Hello,

I’ve followed the steps outlined in https://github.com/NVIDIA/nvidia-docker to setup the system and to start an nvidia-docker container.

Running deviceQuery from the cuda samples showed “Detected 1 CUDA Capable device(s)” and all the details of the GPU found.

“nvidi-smi” from host cli verifies card and driver version (418.67)

However, when running “docker run --gpus all nvidia/cuda nvidia-smi”, I get the following error:
“docker: Error response from daemon: could not select device driver “” with capabilities: [[gpu]].
ERRO[0000] error waiting for container: context canceled”

I’ve restarted docker as suggested in some troublehooting hints but that didn’t solve it. The other hint I found, was to make sure the graphics card driver was installed, which I “nvidia-smi” verified as far as I understand.

The environment:

  • Ubuntu 19.04 (I’ve seen it’s still beta but I just couldn’t update to 18.10)
  • cuda 10.1
  • Docker 19.03.1

Any help appreciated,
Mike

Please try installing nvidia-container-toolkit and restart docker daemon as instructed here (Should work for Ubuntu 19.04 too):
https://github.com/NVIDIA/nvidia-docker#ubuntu-16041804-debian-jessiestretchbuster

Related issue and answer:
https://github.com/NVIDIA/nvidia-docker/issues/1034#issuecomment-520282450

Thanks for your reply, bkakilli. I went through that description but it’s for Ubuntu 18.04. So when I got to…

“curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list”

…it errors out with…

Unsupported distribution!

Check https://nvidia.github.io/nvidia-docker

Just did a search on that and found that forcing 18.04 version should work (https://www.pugetsystems.com/labs/hpc/Workstation-Setup-for-Docker-with-the-New-NVIDIA-Container-Toolkit-nvidia-docker2-is-deprecated-1568/). Went through all steps described and it seems OK.

Glad it worked out!