Install CUDA on Ubuntu 16.04
For the record, my graphic card is a GTX 870M.
- Install Nvidia recommended drivers. You can find it out by using the command
ubuntu-drivers devices
. It will tell you the recommended driver you should install viaapt-get
(I installed nvidia-361).
2.Restart
3.Download CUDA Toolkit from here or Direct link to version 5.7.18 I used
- Run the file
./cuda_7.5.18_linux.run
Make sure to say yes to everything EXCEPT the prompt that reads:
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 352.39? ((y)es/(n)o/(q)uit): n
- Run the tests. Go to the folder you installed the Nvidia tests (default is /~/NVIDIA_CUDA-7.5_Samples). Then change one line (
And do make
You can test by doing nvcc -V
- Install Theano
`pip install theano´
- Add CUDA PATHS to .bashrc:
apt-get
- Run a theano test. As per theano's Docs, you can use a test file like this:
./cuda_7.5.18_linux.run
THEANOFLAGS="mode=FASTRUN,device=gpu,floatX=float32,nvcc.flags=-DFORCEINLINES" python theano_test.py
```
Profit.