CUDA Installation
Dummy proof guide to install CUDA on anything (with a NVIDIA gpu).
Table of contents
- About
- Linux Installation
- Purge/Remove all existing references to CUDA/NVIDIA, if they exist.
- Install specific NVIDIA driver version needed for the desired CUDA toolkit version.
- Check if driver was installed correctly.
- Fetch the key and repositories from NVIDIA directly.
- Install CUDA.
- Update the enviornment variables in your .bashrc file.
- Check if CUDA was installed correctly.
About
I got frustrated with CUDA install guides, so I made this one for my own reference.
Linux Installation
Working as of 11/13/2024. :)
Purge/Remove all existing references to CUDA/NVIDIA, if they exist.
Reboot machine.
Install specific NVIDIA driver version needed for the desired CUDA toolkit version.
Check the CUDA compatibility list and visit the NVIDIA developer repositories page to ensure the version of CUDA is correct for your Ubuntu and Driver version.
CUDA Compatibility List: https://docs.nvidia.com/deploy/cuda-compatibility/ NVIDIA Developer Repositories (apt-key : 3bf863cc.pub)
- Ubuntu 22.04: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/
- Ubuntu 24.04: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/
Reboot machine.