-
Content Count
8,408 -
Joined
-
Last visited
Single Status Update
-
Well, getting CUDA 10.2 toolkit working in an LXC-container running Ubuntu 20.10 Groovy wasn't fun. For one, apparently CUDA 10 is no longer available in 20.10's repos, only CUDA 11. Secondly, installing CUDA 10 via NVIDIA's repos insists on trying to install NVIDIA's drivers inside the container, which obviously isn't going to work, so you have to jump through a bunch of hoops to work around that!
- Set up the NVIDIA repo-settings.
- Install all the dependencies required by the metapackage cuda, except for anything that nvidia-cuda-drivers requires and the package itself.
- Proceed with apt download cuda-10-2 cuda-demo-suite-10-2 cuda-runtime-10-2.
- Install the above debs with dpkg --force-all -i yourdebsabove
- Remove the dependency on nvidia-cuda-drivers for cuda-runtime-10-2 in /var/lib/dpkg/status
- Use apt-mark hold nvidia-cuda-runtime-10-2, so apt update won't undo what you did above and try to install nvidia-cuda-drivers again!
- You'll also likely find out that CUDA 10 - toolkit doesn't compile with GCC 9 or newer, so you'll need to set up GCC 8 with apt -y install gcc-8 g++-8 && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8 && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
I really wish nvidia-cuda-drivers wasn't a hard dependency, would've been much easier!
PS. Yes, I know this isn't exactly the best possible place for this kind of stuff, but I'm documenting here anyways until I can be bothered to whip up my own Wordpress-blog, so someone facing the same issue may still find these instructions via Google.