How to downgrade CUDA on Linux | Change CUDA versions for Torch/Tensorflow
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.
# 1. Removing existing CUDA
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
rm -rf /usr/local/cuda*
sudo apt-get autoremove && sudo apt-get autoclean
# Now you need to reboot
# reboot
# 2. Downloading specific CUDA version
# Install build essentials
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
# Get and install Nvidia CUDA
# reboot
# 3. Set environment variables
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
# REMEMBER TO REPLACE "(( 2 greater than characters ))" ABOVE!
# YouTube does not allow the use of these symbols.
# 4. Install CuDNN
# Download CuDNN - https://developer.nvidia.com/rdp/cudnn-archive
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*
Timestamps:
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
#CUDA #Ubuntu #Guide
-----------------------------
💸 Found this useful? Help me make more! Support me by becoming a member: https://youtube.com/channel/UCkih2oVTbXPEpVwE-U7kmHw/join
-----------------------------
💸 Direct donations via Ko-Fi: https://ko-fi.com/TCNOco
💬 Discuss video & Suggest (Discord): https://s.tcno.co/Discord
👉 Game guides & Simple tips: https://YouTube.com/TroubleChuteBasics
🌐 Website: https://tcno.co
📧 Need voice overs done? Business query? Contact my business email: TroubleChute (at) tcno.co
Everything in this video is my personal opinion and experience, and should not be considered professional advice. Always do your own research and make sure what you're doing is safe.