C/C++ compilers
- Type the following command in the terminal
sudo apt-get install build-essential
CUDA driver and toolkit
- Download NVIDIA developers driver and toolkit from NVIDIA GPU Developer zone page.
- Stop GNOME Desktop Manager. This will kick you to console, so make sure you save all open documents. You may also want to save or print this page because the browser will be closed to.
sudo /etc/init.d/gdm stop
- Use Ctrl+Alt+F1 to select TTY1, type your login and password.
- cd to the directory where NVIDIA driver was downloaded to (usually ~/Downloads).
- Type following command to install the driver and follow the instructions (in most cases all you need is to press "Enter" when asked something)
sudo sh devdriver_[version]_[distribution].run
- Start GNOME
sudo /etc/init.d/gdm start
- Open terminal and cd to the folder with NVIDIA GPU Computing Toolkit (usually ~/Downloads) and install it (press "Enter" when asked to use default instalation path):
sudo sh cudatoolkit_[version]_[distribution].run
- Create /etc/ld.so.conf.d/cuda.conf using your favorite text editor:
sudo gedit /etc/ld.so.conf.d/cuda.conf
- Add following lines to the file and save it:
/usr/local/cuda/lib64
/usr/local/cuda/lib
- Run ldconfig:
sudo ldconfig
NVIDIA GPU Computing SDK (optional)
- Download NVIDIA GPU Computing SDK from NVIDIA GPU Developer zone page.
- In terminal window, cd to the folder SDK was downloaded to (usually ~/Downloads) and type (NO sudo, press "Enter" when asked for default toolkit/SDK instalation folders):
sh gpucomputingsdk_[version]_[distribution].run
- Since some of the examples require additional libraries, type the following in terminal window:
sudo apt-get install libglut3-dev libxi-dev libxmu-dev libgl1-mesa-dev
- cd to NVIDIA GPU Computing SDK 'C' folder (usually ~/NVIDIA_GPU_Computing_SDK/C and type 'make'.
- If compiler still "can't find -lGL", type the following:
sudo rm /usr/lib/libGL.so
sudo ln -s /usr/lib/libGL.so.1 /usr/lib/libGL.so
- To print all you CUDA devices and their capabilities, try deviceQuery from SDK code samples. Type:
~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/deviceQuery
- You may want to check some other examples, for instance:
~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/particles
~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/nbody
~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/Mandelbrot