3 ms·
The annoying thing is that nvidia-docker is still not great. You still have to deal with the driver installed outside the container, and it makes a big differen
by etaioinshrdlu 6y ago
The annoying thing is that nvidia-docker is still not great. You still have to deal with the driver installed outside the container, and it makes a big difference.
Furthermore it seems like even the CUDA runtime is typically not installed in the container, but rather injected in by the nvidia-docker container runtime.
It is not fun to deal with.
- dmm 6y agoYou don't have to use nvidia-docker to use cuda with docker. I made my own cuda containers based on Debian and pass the devices to the docker run command. I mount the libcuda and libnvidia libraries as volumes. I think that's what you mean by injecting the runtime. Here's an example Dockerfile: https://github.com/dmm/docker-debian-cuda/blob/master/Dockerfile https://github.com/dmm/docker-debian-cuda/blob/master/Docker... And here's an example docker run command: docker run -it --rm $(ls /dev/nvidia* | xargs -I{} echo '--device={}') $(ls /usr/lib/x86_64-linux-gnu/{libcuda,libnvidia}* | xargs -I{} echo '-v {}:{}:ro') dmattli/debian-cuda:10.0-buster-debug /bin/bash Verbose but it works fine. You still have to have the nvidia driver installed on the host system.