I notice that nvidia has support for GPU and Docker, but I believe this is only for linux at the moment. Has anyone got it working on windows 10?
In particular, I'm hoping to get access to it for machine learning applications.
https://github.com/NVIDIA/nvidia-docker
Windows containers support GPU acceleration for DirectX and all the frameworks built on top of it. This feature is available in Docker Desktop, version 2.1 and Docker Engine - Enterprise, version 19.03 or later.
Docker doesn't even add GPUs to containers by default so a plain docker run won't see your hardware at all. At a high level, getting your GPU to work is a two-step procedure: install the drivers within your image, then instruct Docker to add GPU devices to your containers at runtime.
Introduction. The NVIDIA Container Toolkit allows users to build and run GPU accelerated Docker containers. The toolkit includes a container runtime library and utilities to automatically configure containers to leverage NVIDIA GPUs.
Since Docker uses Virtualbox to work on Windows, and Virtualbox will not expose CUDA to the guest without PCI passthrough, I think it will not be possible to do this as you are thinking.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With