Versión en español de esta publicación.
This tutorial explains how to install CUDA 6.5 Production Release in a Debian Wheezy system, the first thing we have to do is to download the graphics driver from Nvidia website and select the current model of the graphics card we have, in my case I have a server with 2 Nvidia graphic cards the first one is a Geoforce GTX660 and the second one is a Geoforce GTX650 if you’re not sure of the driver version you should install, you can check the driver version in the following hiperlink.
Also we need to download the CUDA toolkit 6.5 from the following link.
The version of the toolkit we need to download is the Linux 64bit RUN file for the latest version of Ubuntu, the file name is: cuda_6.5.14_linux_64.sh.
Once we have the files needed for the installation we proceed to disable the nouveau driver which is the default driver for Debian, we do that by creating the a new file with the following content:
# edit debian driver configuration file vim /etc/modprobe.d/disable-nouveau.conf # blacklist defualt driver blacklist nouveau options nouveau modeset=0
After having the file for blocking the default driver in place, we proceed to restart the machine in normal mode,
Once restarted we are going to note that the resolution got at a lower level and that means that the default driver was not loaded, then we need to get some files from our repository by executing the following commands.
# dependencies to build the new driver apt-get install build-essential apt-get install linux-headers-$(uname -r)
After installing this we proceed to remove the nouveau driver completely from our system by executing the following commands:
# remove the nouveau driver completly apt-get remove --purge xserver-xorg-video-nouveau
After the removal of the driver has happened we need to restart our system in recovery mode, once restarted in recovery and having the nice console interface we proceed to the driver installation, first we need to tell give the system the appropriate version compiler that was used to compile the current kernel this because the system needs to compile the current NVIDIA driver, if we don’t know which version was used and which kernel we have we can find that out with the following command
# find curr gcc version cat /proc/version
and we are going to get something like this:
# version output Linux version 3.2.0-4-amd64 (firstname.lastname@example.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.54-2
Once we know the correct version we need to set it with an export like this.
# set gcc version export CC=gcc-4.6
Then proceed with the driver installation, we navigate to our download path and execute the driver
# execute driver install sh NVIDIA-Linux-x86_64-340.32.run
Once the installation is finished we proceed to reboot the machine and we note we have a nice resolution and our new drivers installed, then we proceed with the toolkit install like this.
# execute toolkit install sh cuda_6.5.14_linux_64.run
When prompted we select to not install the NVIDIA driver since we already installed, and choose a good path for the samples, the last thing to do is to compile the samples and run them, to do this we navigate to the samples directory that me choose and simple execute a make.
And thats it!