Science&Enigneering

NVIDIA CUDA Installation for Ubuntu

##- 2023. 4. 13. 19:42
728x90

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu

 

cuda-installation-guide-linux 12.1 documentation

The installation instructions for the CUDA Toolkit on Linux. 13. Post-installation Actions The post-installation actions must be manually performed. These actions are split into mandatory, recommended, and optional sections. 13.1. Mandatory Actions Some ac

docs.nvidia.com

The CUDA version must be greater than 11.0.

 

1. Remove Outdated Signing Key:

sudo apt-key del 7fa2af80

2. Install the new cuda-keyring package:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb

 

3. Update the Apt repository cache:

sudo apt-get update

4. Install CUDA SDK

sudo apt-get install cuda

5. Reboot the system

sudo reboot

6. Add environment variables

export PATH=/usr/local/cuda-12.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.0/lib64\
                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
300x250