Comment 7 for bug 1963976

Revision history for this message
ash ketschup (ashketschup) wrote :

I was able to find a workaround by doing the installation the "complicated nvidia way". Just in case anybody else needs a workaround and has no idea how to do so, here the steps I did (no warranty that it works for you and will not break up your system (for me this happened this happened 5 times but finally I found out that the following steps works very well for me.))

#DOWNLOAD CUDNN tar.gz (yes, in order to do so, you have to create an nvidia developer account -.-'#).
https://developer.nvidia.com/rdp/cudnn-download

# install compatible driver (somehow the cuda installation removes the previous installation)
sudo apt install nvidia-driver-515
sudo reboot

# INSTALL CUDA11 (CUDA 12 is not compatible currently)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
 wget http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-0-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

# check if cuda 11 is installed successfully (if command could be found your fine :))
nvcc

# add cuda to PATH variable
echo "export PATH=/usr/local/cuda-11.0/bin${PATH:+:${PATH}}" >> ~/.bashrc
sudo reboot

# copy the cudnn libs (go to folder with cudnn.tar.gz download first)
tar -xvf cudnn-linux-x86_64-8.7.0.84_cuda11-archive.tar.xz
sudo cp cudnn-*-archive/include/cudnn*.h /usr/local/cuda/include.
sudo cp -P cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

# install pip (to) install tensorflow
sudo apt install python3-pip

# install tensorflow 2.9.1 since 2.11 did not work for me with cudnn
pip install tensorflow==2.9.1

# create a symlink to libcusolver.so.11
sudo ln -s /usr/local/cuda/targets/x86_64-linux/lib/libcusolver.so.11 /home/horus/.local/lib/python3.10/site-packages/tensorflow/python/libcusolver.so.11

# check if gpus are available
python3 -c 'import tensorflow as tf; print(tf.version.VERSION);print(tf.config.list_physical_devices());'