Reputation: 747
I am using docker to launch isolated apps. My app will use CUDA library for GPGPU computing. I am thinking of building an image with cuda installed on it but that would make it too huge. I am not sure either if CUDA display driver installation would go throuh successfully on docker image.
Better way would be to share CUDA libraries on the machine with the container, is there a way to do that ?
Thank you, pradeep.
Upvotes: 0
Views: 2287
Reputation: 5208
I would start with just using
docker run --privileged ubuntu -ti --rm bash
the --privileged is a big hammer, but gives you a container that has full power :)
Upvotes: 3
Reputation: 38237
If you can mount your driver as a volume on your host, then you might be able to talk with it directly from within the container by mounting it with docker run -v hostdir:containerdir:rw
(see run docs )
If you don't have the device mounted outside the container, then I suspect that talking directly to your graphics card, even through shared libraries, will not work using a standard Docker configuration because the default LXC configuration in docker excludes sys_rawio
for both security and portability reasons.
See the lxc_template.go file for the list of capabilities dropped by default.
Upvotes: 1