I’m trying to create a MINIMAL Ubuntu 16.04 install with CUDA runtime support but I’m having trouble with the “minimal” part.
From a fresh raw Ubuntu (using about 450MB on disk) , it’s straightforward to download the .deb install file from NVidia’s website, use dpkg to register it, and issue
sudo apt-get install nvidia-390 cuda
to install a full CUDA environment that’s ready to use for running CUDA apps or doing full development. This installs everything from the CUDA libraries to GCC to the CUDA visual tools to cuBLAS. This also uses about 4 GB of space… far far more than the bare Ubuntu itself. I want a tiny install to make it fast and cheap to snapshot the whole disk without worry.
I’m trying to make a MINIMAL install with as few files as possible, just the runtime. No need for compilers or profilers, just the runtime libs and probably “nvidia-smi”. (without installing CUDA you don’t have the shared libraries like libcudart.so.8.0)
Unfortunately I don’t see an easy way to do this, beyond installing CUDA then going wild using “rm” on all the CUDA files I can find (mostly in /usr/local/cuda) except the runtime library itself.
I also looked at the legacy .run runfile installer to see if there was a minimal install option, but you basically only have the option for driver, toolkit, and samples, not “minimal runtime.”
Any suggestion for making this minimal “can run CUDA apps but with no developer bloat” environment?
As an alternative, is it possible to statically link all the cuda libs into the CUDA executable? I’d expect this is a questionable idea (can’t get any CUDA updates/bugfixes) even if it were possible.