This post is depreciated, look a this: http://luiszeni.com.br/?p=116
Training deeplearning models in GPUs is faster than on CPUs, therefore GPU support is a good tool when we are training these models. I guess that Nvidia Cards are actually the market standard to this finality. In this way, it is necessary to install Cuda suport in the machine that we will compute our models using GPU.
When i was trying to install Cuda on my training server with an geforce 660 TI I had a lot of problems. In this “tutorial” I share the steeps that i fallowed to solve the problems that occurred while I was installing CUDA in my training machine.
My first attempt was to install cuda 7.5 on 16.4, a complete failure. I tried it on 14.4 too, fail again, beeeeeeeehhh =_____= …. On 15.4 it worked! However, 15.4 is not an LTS, have no updates anymore, and it SUX! In my delusion I figured out that the version 8.0 has been released, and, OK, let’s try IT, it worked in the end =).
Ok, let’s start.
- Download cuda_8.0.27_linux.run from NVidia website
- Download the path cuda_126.96.36.199_linux.run from NVidia website (It allows Cuda to work with gcc > 5 ) .
- In my computer when I run cuda_8.0.27_linux.run, it says that nouveal is blocking the installation. Therefore I put that bad guy in a blacklist.
sudo emacs /etc/modprobe.d/blacklist-nouveau.confc
- Then, add the following line in that file:
blacklist nouveau option nouveau modeset=0d.
sudo update-initramfs -u
- Reboot computer
- Go to a TTY (Ctrl+Alt+F1), and login to your user.
- The path to work with gcc 5 needs the Cuda driver installed and the Cuda driver needs the gcc < 5. Therefore, I installed gcc-4.9 and g++-4.9 and changed the link to them.
- sudo apt-get install gcc-4.9 g++-4.9
- sudo rm /usr/bin/gcc
- sudo rm /usr/bin/g++
- sudo ln -s /usr/bin/gcc-4.9 /usr/bin/gcc
- sudo ln -s /usr/bin/g++-4.9 /usr/bin/g++
- Go to the directory where you have the CUDA driver, and change it permissions to run
Kill the lightdm to install the new graphic's carddr
sudo service lightdm stop
- Run the cuda driver
- Follow the installation….
- Return the links to gcc-5.x (Same as the steep 5)
- Install the path ./cuda_188.8.131.52_linux.run
- Put the exports on your .bashrc file:
- Try to make the Cuda Examples
if( it works)
Drink a beer =), Prosit!