Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

笔者是使用目前最新的19.03版docker安装,按照他的使用命令的前两个
Github项目地址
Error response from daemon: could not select device driver

#### Test nvidia-smi with the latest official CUDA image
docker run --gpus all nvidia/cuda:10.0-base nvidia-smi

# Start a GPU enabled container on two GPUs
docker run --gpus 2 nvidia/cuda:10.0-base nvidia-smi
# Starting a GPU enabled container on specific GPUs
docker run --gpus '"device=1,2"' nvidia/cuda:10.0-base nvidia-smi
docker run --gpus '"device=UUID-ABCDEF,1"' nvidia/cuda:10.0-base nvidia-smi

这样用不了,但我用

# Specifying a capability (graphics, compute, ...) for my container
# Note this is rarely if ever used this way
docker run --gpus all,capabilities=utility nvidia/cuda:10.0-base nvidia-smi

成功启动镜像

你可能感兴趣的:(技术笔记与杂谈,cuda,gpu,docker,tensorflow,nvidia)