Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You 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/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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: