I'm running one of NVIDIAs official CUDA docker images with CUDA 12.x installed on it. I want to install another version of cuda in this image as well.
When trying to install it using sudo apt install cuda=11.x.y-z
, it fails with an Invalid cross-device link
error. After strace
ing to find the source, here is a minimal reproduction of what APT is failing to do:
user@devbox:/usr/lib/x86_64-linux-gnu$ sudo ln libcuda.so.530.30.02 libcuda.so.530.30.02.dpkg-tmp
ln: failed to create hard link 'libcuda.so.530.30.02.dpkg-tmp' => 'libcuda.so.530.30.02': Invalid cross-device link
The entire /usr directory is inside the containers default volume, so this is not a cross-device link. It's a link inside the same directory. Why does the link fail, is there a way to fix it?