In my Devuan GNU/Linux Beowulf distribution (which is essentially Debian Buster without systemd), CUDA 10.1 is installed. I don't want to uninstall it for various reasons; but - I do want to use a different CUDA version, which I have placed under /usr/local/cuda-10.2
.
When the existing CUDA version isn't integrated into the distribution - this is pretty easy: Just re-target the /usr/local/cuda
symlink to point to /usr/local/cuda-X2.Y2
instead of /usr/local/cuda-X1.Y1
, and make sure any environment variables mentioning CUDA regard the symlinked path instead of the version-specific path. But what's going to stop applications from using /usr/lib/x86_64-linux-gnu/libcudart.so
or /usr/include/cuda_runtime.h
? That's so tempting! :-(
I would like a checklist, as robust as possible, of changes I need to make - to environment variables, to symlinks, to entries in configuration files - to make sure my local version gets used. Of special interest are packages built with CMake or with (sigh) autotools.
Notes:
- The nVIDIA kernel driver version remains the same (CUDA 10.2 can live with the distribution-provided version, it seems).
- This question is not about how to install the local version of CUDA. In a sense, it's complementary to questions like this one.