docker: Error response from daemon: could not select device driver ““ with capabilities: [[gpu]]问题解决
Posted 一个菜鸟的奋斗
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker: Error response from daemon: could not select device driver ““ with capabilities: [[gpu]]问题解决相关的知识,希望对你有一定的参考价值。
docker在19.03版本之后,可以不用安装nvidia-docker,就能获得GPU的计算支持。
但是,直接在docker中使用GPU设备,出现报错如下:
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
这个问题可以通过安装nvidia-container-toolkit来解决。
1、添加nvidia-docker的源
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \\
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \\
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
如果不添加上面的源,可能会报如下错误:
E: Unable to locate package nvidia-container-toolkit
2、安装nvidia-container-toolkit
sudo apt-get install -y nvidia-container-toolkit
3、重启docker
sudo systemctl restart docker
问题解决。
以上是关于docker: Error response from daemon: could not select device driver ““ with capabilities: [[gpu]]问题解决的主要内容,如果未能解决你的问题,请参考以下文章
Docker Error response from daemon,Docker 换镜像
Docker获取镜像报错docker: Error response from daemon
docker login 错误 Error response from daemon:
docker pull 镜像时提示Error response from daemon
Docker执行错误报错--Error response from daemon: No command specified
本地docker不能登录远程harbor服务器,error response from daemon,error parsing http 403 response body