198 karma · joined November 5, 2015
https://github.com/coreutils/coreutils/blob/ccbd1d7dc5189f46...
I'm not going to dwell on the details but there are many reason why doing so can go horribly wrong. Believe me, we (NVIDIA) evaluated our options and know the implications of running our drivers within containers.
Do you really know what --privileged do? If so, you know that there is no such thing as "install the driver system wide". For that you would have to circumvent the namespaces and a bunch of other things that Docker put in place.
"portable within the scope of a given kernel" [and driver] "version"
Well that's not what I call portable :) With nvidia-docker you can build a CUDA image on your laptop and deploy it anywhere in the cloud or on premises without a single modification.
What you are showing[1] is how to install NVIDIA drivers on CoreOS the hackish way (not persistent, no driver libs, no DKMS, no UVM, no KMS...)
Regarding rkt, it's not supported at the moment but a similar approach could be taken. As for the Docker CLI wrapper, you can avoid it if you really need to.
$ docker-machine create --driver amazonec2 --amazonec2-instance-type g2.2xlarge ...
$ docker-machine ssh <host> # install the NVIDIA driver and nvidia-docker-plugin
$ eval `docker-machine env <host>`
$ ssh-add ~/.docker/machine/machines/<host>/id_rsa
$ NV_HOST="ssh://ubuntu@<ip>:" nvidia-docker run mybuild/tensorflow
Step 2 can be skipped if you use a custom AMI.