Watch the video:
0:00 - Explanation
0:13 - Why?
0:23 - Steps in this video
0:46 - Delete existing CUDA install
1:18 - Install Build Essentials
1:32 - Installing older CUDA version
3:27 - Set environment variables
4:30 - Install CuDNN
6:08 - Check the Nvidia CUDA version
Trying to use Tensorflow, Torch or another program on Linux but can’t because of CUDA version mismatch errors or wrong CUDA versions? Well, this video shows you how to uninstall and reinstall an older version of CUDA properly on Linux/Ubuntu, including CuDNN as well. By the end, you should be able to use AI and other software as intended on the correct CUDA versions. I have no idea if these commands work for Docker.
sudo apt –purge remove “cublas*” “cuda*"
sudo apt –purge remove “nvidia*"
rm -rf /usr/local/cuda*
sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
echo ’export PATH=/usr/local/cuda-11.3/bin:$PATH’ (( 2 greater than characters )) ~/.bashrc
echo ’export LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64:$LD_LIBRARY_PATH’ (( 2 greater than characters )) ~/.bashrc
tar -xzvf ((archive))
sudo cp -P cuda/include/cudnn.h /usr/local/cuda-11.3/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-11.3/lib64/
sudo chmod a+r /usr/local/cuda-11.3/lib64/libcudnn*