Install CUDA on Ubuntu 16.04
For the record, my graphic card is a GTX 870M.
1. 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 via apt-get (I installed nvidia-361).
2.Restart
3.Download CUDA Toolkit from here or