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


I’ve followed the steps outlined in 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,

Please try installing nvidia-container-toolkit and restart docker daemon as instructed here (Should work for Ubuntu 19.04 too):

Related issue and answer:

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$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list”

…it errors out with…

Unsupported distribution!


Just did a search on that and found that forcing 18.04 version should work ( Went through all steps described and it seems OK.

Glad it worked out!