大网数据广告活动
服务器运维问答

Why are GPUs accessible from docker containers running on Linux hosts, but not on Windows or MacOS hosts?

· 52CE 我爱测

Recent versions of docker (or any version of nvidia-docker) allow direct(?) access to the host GPU from within docker containers, with full access to CUDA APIs. This is very convenient when deploying complex machine learning infe…

问题原文

原帖链接 · Will · CC BY-SA 4.0

Recent versions of docker (or any version of nvidia-docker) allow direct(?) access to the host GPU from within docker containers, with full access to CUDA APIs. This is very convenient when deploying complex machine learning inference servers.

However, currently only Linux hosts are supported as far as I can tell.

Why can't Microsoft and Apple step up their game and provide the same level of support? Which is to say, what trick is being used on Linux, which is apparently hard to imitate in other OSes?

已采纳解答

原帖链接 · Raulinbonn · CC BY-SA 4.0

Docker on linux uses the hosting kernel directly, but Docker on Windows actually runs in a VM (hosted by Hyper-V in Windows) because Windows doesn't have a linux kernel for Docker to directly interact with. So reaching the host GPU from a docker container on Windows then requires reaching out from the docker container in the guest VM into the hosting Windows OS to communicate with the GPU drivers. A lot of special development from Microsoft and the GPU manufacturer is required to support all that properly.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-02-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。