I'm using cuda 11.0, with cudnn 8.0.5, tensorflow 2.4 the error I got from runnning my code was this,
2021-10-28 17:28:12.120217: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/ahn/anaconda3/envs/imageai/lib/python3.7/site-packages/cv2/../../lib64:
I thought this was a cudnn installation error and have tried installing both cudnn 8.0.4 and 8.0.5 both giving me the same error, the path in the error above doesn't exist and I'm guessing the error has to do something with the requirements I installed. Many thanks to those willing to help me!
Check CUDA folders:
gediz@u18serv:~$ ls /usr/local |grep cuda
cuda
cuda-11
cuda-11.5
Check cuDNN libraries:
gediz@u18serv:~$ ls /usr/local/cuda-11.5/lib64/libcudnn.so.8*
/usr/local/cuda-11.5/lib64/libcudnn.so.8 /usr/local/cuda-11.5/lib64/libcudnn.so.8.2.4
If it is there add set permissions and add to path:
sudo chmod a+r /usr/local/cuda/include/cudnn*.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
export PATH=/usr/local/cuda-11.5/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=/usr/local/cuda-11.5/lib64:${LD_LIBRARY_PATH}
export CUDA_HOME=/usr/local/cuda
Adjust the paths according to the version of CUDA you want to use. I have installed two CUDA toolkits one from the NVIDIA web installer, the other from apt-get nvidia-cuda-toolkit