Installing specific version of CUDNN on Ubuntu 20.04 with Package Manager

I have most of what I need working, I’m using the Ubuntu repo (Index of /compute/cuda/repos/ubuntu2004/x86_64) and I can install specific versions of CUDA, for example sudo apt-get install cuda-11.3 installs to /usr/local/cuda-11.3 and there’s a sym link to /usr/local/cuda and update-alternatives appears to work find (I also have 11.0 installed).

The issue is I also want to install the correct version of CuDNN and TensorRT and I’m unsure what the correct sudo apt-get install for these are - I downloaded the deb files but that doesn’t seem to be working - they don’t seem to install side by side.

I’ve also set my LD_LIBRARY_PATH based of the symlink so it “should” point to the correct libraries but I’m getting downstream errors that seem to indicate that the incorrect .so is being found.

How do I install a specific side-by-side versions of the extras like CuDNN using a package manger?

Hi,

Please refer to the installation guide.

1 Like

It would be very convenient to add support for apt installing multiple cudnn versions… right now there is only one option for libcudnn8 that supports CUDA12 which is not supported yet by the library I’m trying to use (jaxlib).

You can install a specific version using apt

sudo apt-get install libcudnn8=${cudnn_version}-1+${cuda_version}

In order to work out what version to install I manually searched for libcudnn8 in

https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/

for me that was libcudnn8_8.5.0.96-1+cuda11.7_amd64.deb

I had to do this because as you mention the default is to install the libcudnn for cuda12 and that caused all sorts of random crashes until I worked it out - it would be good if there was an easier way to install a specific version of the toolchain without having to manually find and specify all the versions.

Ah, thank you for the info!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.