-
Notifications
You must be signed in to change notification settings - Fork 61
Frequently Asked Questions
There are currently 2 ways to install CUDA Toolkit on Debian/Ubuntu:
- *.deb style
- *.run style (I personally prefer the second one.)
You can download them on NVIDIA official website.
Please follow the instructions carefully, 1) Before Installation, 2) Installation, and 3) After Installation.
Caution, caution, caution !!! I said it thrice because it's important.
Install CUDA would potentially cause GUI to crash. (i.e. black screen)
Make sure you can login remotely (ssh) to fix it if GUI crash on startup.
Follow the instruction at the bottom of NVIDIA official website. If the version you're using is supported then there's a download link followed by clear instructions.
sudo apt-get install build-essential
sudo apt-get --purge remove nvidia-*
sudo service lightdm stop
Install CUDA and CUDA-samples under /usr/local/cuda-6.5/
and /usr/local/cuda-6.5/samples
, respectively.
(Unless you completely understand how to change my Makefile.)
sudo ./cuda_6.5.14_linux_64.run
sudo service lightdm restart
No matter which way you install CUDA Toolkit, make sure you add PATH
and LD_LIBRARY_PATH
to your ~/.bashrc
after installation.
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64 # For 64-bit user
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib32 # For 32-bit user
(If you don't know whether your computer is 32 or 64 bits, add them both !!)
Then source it. Remember to source it like this: source ~/.bashrc
Check version of nvcc
using nvcc --version
.
If it says anything other than nvcc: command not found
, then it's done. Congrats !!