记录 | docker报错could not select device driver ““ with capabilities: [[gpu]].

ubuntu18.04 上启动 docker start 报错:

could not select device driver “” with capabilities: [[gpu]].
docker: Error response from daemon: could not select device driver “” with capabilities: [[gpu]].
ERRO[0005] error waiting for container: context canceled

在这里插入图片描述

解决:
安装 nvidia-container-runtime

sudo curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
  sudo apt-key add -
  
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)

sudo curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
  
sudo apt-get update
sudo apt-get install nvidia-container-runtime

然后重启 docker:

systemctl restart docker 

你可能感兴趣的:(踩坑记录,docker,容器,gpu)