This Repository guides you with setting up NVIDIA-GPU on your PC.
Much of the below work is taken from here. This guide incorporates solution to some bugs we faced from the above source.
By the time this repository is up, Pytorch supports CUDA11.7 and CUDA11.6 in GPU domain.So, this considers CUDA11.7.
Steps:
1.Run 1.sh:
This step updates the kernel to 5.18.
This step restarts your PC (Don't panic[It's necessary])
sh 1.sh
2.Download NVIDIA Display Driver according to your GPU Hardware from here.
3.Restart your PC and enter Linux-5.18Kernel Recovery Mode through Grub and type below commands in the terminal.
This command is same as running the .run file but in recovery mode.
cd ..
cd /home/username/Downloads/
sudo sh NVIDIA-Linux-x86_64-DriverName.run
4.Download CUDA Toolkit through below command:
sh 2.sh
5.Download CUDNN from here.
This step requires login/signup.
Please install Linux-x86 Tar not Ubuntu22.04 Deb
Extract the downloaded file and rename the extracted folder to cudnn
After downloading, follow below steps:
sh 3.sh
From here,you can install Pytorch either in pip or conda.
Below Steps are for conda installation(Necessary if you don't have conda):
sh 4.sh
Restart the terminal. Create a new conda environment and enter it by:
conda create --name (replace this)
conda activate (replace this)
Conda Installation for GPU-Support:(Necessary even if you have Conda)
sh 5.sh
pip3 install torch torchvision torchaudio