[Notes] 为什么目前无法再docker for windows中调用GPU

本随笔记载与2019年1月23日,若随着技术发展,本随笔记录的困难被攻克也是可能的。

 

参考(https://www.reddit.com/r/docker/comments/86vzna/gpu_access_from_docker_container_windows_10/)

Well you need to understand that direct access to the graphics card is done by a driver.

If your host system is windows there is no way for the Linux environment inside your docker container to communicate with this windows driver.

It's like trying to run a MacOs executeable in Windows.

It simply won't work.

If the host system is linux you can bypass the graphics card to the docker container.

  

简单来说调用GPU的是GPU的驱动,而windows安装的是windows版本的驱动程序,使用docker安装的是linux的系统,linux的系统无法使用windows的驱动程序,故此无法调用GPU。docker中的容器调用驱动,都是要使用宿主机中内核里的驱动,因此当宿主机是windows时,所有需要借助驱动的docker镜像都用不了了。

posted @ 2019-01-24 11:09  虚无真仙  阅读(523)  评论(0编辑  收藏  举报