“docker:19.03-dind”无法选择设备驱动程序“nvidia”具有功能:[[gpu]]
我收到了一个K8S+Dind问题:
- 启动Kubernetes群集
- 在运行请求GPU的作业时,在此群集中启动一个主Docker映像和一个DIND映像
- ,GoT Orror
无法选择功能:[[GPU] ]
完整错误
http://localhost:2375/v1.40/containers/long-hash-string/start: Internal Server Error ("could not select device driver "nvidia" with capabilities: [[gpu]]")
exec
to K8S POD内的DIND图像, nvidia-smi
不可用。
有些调试,看来这是由于dind缺少了nvidia-docker-toolkit,当我直接在本地笔记本电脑Docker上运行相同的工作时,我遇到了相同的错误,我通过安装 nvidia-docker2来解决相同的错误 sudo apt-get安装-y nvidia-docker2
。
我想也许我可以尝试将NVIDIA-DOCKER2安装到Dind 19.03(Docker:19.03-Dind),但不确定该怎么做?由多个舞台码头构建?
非常感谢!
更新:
POD规格:
spec:
containers:
- name: dind-daemon
image: docker:19.03-dind
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己工作。
Referring to
但是,由于这篇文章是从现在开始的3年前,所以我确实花了很多时间来匹配依赖项版本,在3年内回购迁移等。
我修改了Dockerfile的修改版本来构建它。
当我使用
exec 要登录到docker-indocker容器中,我可以成功运行
nvidia-smi
(以前找不到的错误,然后无法运行任何与GPU资源相关的Docker Run)欢迎您在<<<代码> BrandSight/dind:nvidia-docker
I got it working myself.
Referring to
But since this post is 3 year ago from now, I did spent quite some time to match up the dependencies versions, repo migration over 3 years, etc.
My modified version of Dockerfile to build it
When I use
exec
to login into the Docker-in-Docker container, I can successfully runnvidia-smi
(which previously return not found error then cannot run any GPU resource related docker run)Welcome to pull my image at
brandsight/dind:nvidia-docker