3 ms·
Just for information, it's also possible to use NVIDIA GPUs inside Docker containers without using `nvidia-docker`: https://stackoverflow.com/questions/2518540
by ThePhysicist 9y ago
Just for information, it's also possible to use NVIDIA GPUs inside Docker containers without using `nvidia-docker`:
https://stackoverflow.com/questions/25185405/using-gpu-from-a-docker-container https://stackoverflow.com/questions/25185405/using-gpu-from-...
In a nutshell, you can give the container access to the NVIDIA device file via the `--device` flag, so all you need is a container with the NVIDIA drivers. The added benefit of this is that you can use different versions of the drivers side-by-side (in my understanding).
I thought this might be relevant as some people might not want to use the `docker-nvidia` CLI to run containers (I'm not sure how you would use this via the Docker API for example).
- flx42_ 9y agoWe document how this on our wiki: https://github.com/NVIDIA/nvidia-docker/wiki/Internals https://github.com/NVIDIA/nvidia-docker/wiki/Internals > The added benefit of this is that you can use different versions of the drivers side-by-side (in my understanding). No, you can only have one driver version, the one that correspond to the loaded kernel modules. Installing the driver inside a Docker image makes it non-portable.
- ThePhysicist 9y agoAh thanks for the clarification, I was not aware of this!
- arnon 9y agoIt's also possible to set up CUDA in LXC https://sqream.com/cuda-in-lxc-containers/ https://sqream.com/cuda-in-lxc-containers/