Install
- Follow this: https://developer.nvidia.com/cuda-downloads
- Reboot computer
- Open a terminal and run
nvidia-smi
as a check - Run the following in the terminal (source: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html):
1
nano /home/username/.bashrc
write the following 2 lines in the bashrc file:
1
2
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}$
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- open up a new terminal window and do
nvcc –version
to check if everything is working
If you want to work with .cu scripts in vscode, install nsight extension (only extension made by Nvidia)
Guide for trouble shooting: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html