赞
踩
报错信息:
Error response from daemon: Unknown runtime specified nvidia.
1.加key
docker环境安装Nvidia-container-runtime
2.对于已经安装好docker的Ubuntu系统
(1). 首先配置nvidia源
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
(2). 参考https://gitee.com/wuxler/nvidia-container-runtime?_from=gitee_search 安装nvidia-container-runtime
sudo apt-get install nvidia-container-runtime
一键安装docker
wget -qO- https://get.docker.com/ | sh /dev/stdin --mirror Aliyun
2.cd /etc/docker
看看有没有daemon.json,没有就新建 touch daemon.json;
sudo vim daemon.json写入文件
- {
- "runtimes": {
- "nvidia": {
- "path": "/usr/bin/nvidia-container-runtime",
- "runtimeArgs": []
- }
- }
- }
3.最重要的重启:!
重启前:sudo docker info
sudo
- root@crist:/etc/docker# sudo service docker stop
- root@crist:/etc/docker# sudo service docker start
重启后:Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux nvidia runc
就可以了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。