Download the CUDA 8.0 and NVIDIA 375.20 driver run files
wget -O cuda https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_linux-run
wget -O driver http://us.download.nvidia.com/XFree86/Linux-x86_64/375.20/NVIDIA-Linux-x86_64-375.20.run
Purge anything related to NVIDIA or CUDA libraries
sudo apt-get purge nvidia*
sudo apt-get purge libcuda*
Edit blacklist.conf file
sudo nano /etc/modprobe.d/blacklist.conf
Add the following to blacklist.conf:
blacklist amd76x_edac #this might not be required for x86 32 bit users.
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Update to include nouveau blacklist
update-initramfs -u
Restart
sudo shutdown -r now
Stop X windows system on Mint 18
sudo service mdm stop
Install the driver
sudo sh ./driver
Install CUDA 8.0
sudo sh ./cuda
Restart again
sudo shutdown -r now
Export paths
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64\
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Clone torch7 repo
git clone https://github.com/torch/distro.git ~/torch --recursive
Install torch, luaJIT, and dependencies
cd ~/torch; bash install-deps;
./install.sh
Source .bashrc to update
source ~/.bashrc
Run TREPL
th