Install/Update CUDA on Ubuntu Machines
Introduction
This document contain the step to install/update CUDA on Ubuntu machines
Installation
Step 1. Download cuda from NVIDIA official website. Either Deb (local), deb (network), or runfile (local) would work.
Step 2. Follow the instructions on the NVIDIA official website to download CUDA.
Step 3. Reboot the machine
$ sudo reboot
Step 4. Check system cuda after reboot
Step 5. Setup the environment in ~/.bashrc. Please see the official document.
### add cuda path in ~/.bashrc
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Step 6. Source new environment
$ source ~/.bashrc
Step 7. Test driver
$ nvidia-smi
Step 8. Test cuda compiler
$ nvcc -V