当前位置:   article > 正文

[docker]Error response from daemon: could not select device driver ““ with capabilities: [[gpu]]._docker: error response from daemon: could not sele

docker: error response from daemon: could not select device driver "" with c

加nvidia-container-runtime的源

curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
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 stop docker
把运行时添加到docker中:
dockerd --add-runtime=nvidia=/usr/bin/nvidia-container-runtime

创建容器时一定要指定gpus参数

docker run -it --gpus=all 镜像名  执行命令

进入容器后执行

nvidia-smi
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/604838
推荐阅读
相关标签
  

闽ICP备14008679号