Last active
October 9, 2024 18:22
-
-
Save Ahanio/947593dbc009a772776c32946cd0470b to your computer and use it in GitHub Desktop.
Revisions
-
Ahanio revised this gist
Oct 9, 2024 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,10 +36,10 @@ sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update # install nvidia driver with dependencies sudo apt install libnvidia-common-550 sudo apt install libnvidia-gl-550 sudo apt install nvidia-driver-550 sudo apt install nvidia-dkms-550 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 -
Ahanio revised this gist
Jul 3, 2024 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,12 +17,12 @@ sudo rm /etc/apt/sources.list.d/cuda* sudo apt-get autoremove && sudo apt-get autoclean sudo rm -rf /usr/local/cuda* ### Make GCC-10 as the default GCC version. sudo apt update -y sudo apt upgrade -y sudo apt install -y build-essential sudo apt install -y gcc-10 g++-10 cpp-10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10 # system update sudo apt-get update -
Ahanio created this gist
Jul 3, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,67 @@ #!/bin/bash ### steps #### # verify the system has a cuda-capable gpu # download and install the nvidia cuda toolkit and cudnn # setup environmental variables # verify the installation ### ### to verify your gpu is cuda enable check lspci | grep -i nvidia ### If you have previous installation remove it first. sudo apt-get purge nvidia* sudo apt remove nvidia-* sudo rm /etc/apt/sources.list.d/cuda* sudo apt-get autoremove && sudo apt-get autoclean sudo rm -rf /usr/local/cuda* ### Make GCC-11 as the default GCC version. sudo apt update -y sudo apt upgrade -y sudo apt install -y build-essential sudo apt install -y gcc-11 g++-11 cpp-11 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 # system update sudo apt-get update sudo apt-get upgrade # install other import packages sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev # first get the PPA repository driver sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update # install nvidia driver with dependencies sudo apt install libnvidia-common-535 sudo apt install libnvidia-gl-535 sudo apt install nvidia-driver-535 sudo apt install nvidia-dkms-535 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" sudo apt-get update # installing CUDA-12.1 sudo apt install cuda-12-1 # Download cuDNN 8.9.4 tar from NVIDIA Official site: https://developer.nvidia.com/rdp/cudnn-archive CUDNN_TAR_FILE='cudnn-linux-x86_64-8.9.4.25_cuda12-archive' tar -xf Downloads/${CUDNN_TAR_FILE}.tar.xz # copy the following files into the cuda toolkit directory. sudo cp -P ${CUDNN_TAR_FILE}/include/cudnn.h /usr/local/cuda-12.1/include sudo cp -P ${CUDNN_TAR_FILE}/lib/libcudnn* /usr/local/cuda-12.1/lib64/ sudo chmod a+r /usr/local/cuda-12.1/lib64/libcudnn* # adding NVCC to environment path export PATH=$PATH:/usr/local/cuda-12.1/bin # Finally, to verify the installation, reboot and check nvidia-smi nvcc -V