Research GPU use in Docker and Podman on Windows
Describe the bug
Figure out how to run a CUDA program in Docker on WSL and Windows:
- What needs to be in the Dockerfile?
- What's the Docker run command?
- Does anything special (driver, CUDA toolkit) need to be installed in the WSL image, or on the host (Win)?
- All the above for Podman
Possibly useful: https://docs.nvidia.com/ai-enterprise/deployment/vmware/latest/docker.html https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-the-nvidia-container-toolkit https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/cdi-support.html
And then: how to access CUDA on Linux and Mac? how to access AMD GPUs on various platforms? how to access Apple GPUs on Mac?
For nvidia, container toolkit and the nvidia drivers need to be installed on a linux host. On Windows, docker desktop includes the toolkit.
The container needs to be created with either runtime=nvidia or gpus=all. Then you need the opencl-icd bits in the container.
The linuxserver docker image works with cuda: https://github.com/linuxserver/docker-boinc