C/C++ compilers

  1. Type the following command in the terminal
  2. sudo apt-get install build-essential

CUDA driver and toolkit

  1. Download NVIDIA developers driver and toolkit from NVIDIA GPU Developer zone page.
  2. 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.
  3. sudo /etc/init.d/gdm stop
  4. Use Ctrl+Alt+F1 to select TTY1, type your login and password.
  5. cd to the directory where NVIDIA driver was downloaded to (usually ~/Downloads).
  6. Type following command to install the driver and follow the instructions (in most cases all you need is to press "Enter" when asked something)
  7. sudo sh devdriver_[version]_[distribution].run
  8. Start GNOME
  9. sudo /etc/init.d/gdm start
  10. 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):
  11. sudo sh cudatoolkit_[version]_[distribution].run
  12. Create /etc/ld.so.conf.d/cuda.conf using your favorite text editor:
  13. sudo gedit /etc/ld.so.conf.d/cuda.conf
  14. Add following lines to the file and save it:
  15. /usr/local/cuda/lib64
  16. Run ldconfig:
  17. sudo ldconfig

NVIDIA GPU Computing SDK (optional)

  1. Download NVIDIA GPU Computing SDK from NVIDIA GPU Developer zone page.
  2. 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):
  3. sh gpucomputingsdk_[version]_[distribution].run
  4. Since some of the examples require additional libraries, type the following in terminal window:
  5. sudo apt-get install libglut3-dev libxi-dev libxmu-dev libgl1-mesa-dev
  6. cd to NVIDIA GPU Computing SDK 'C' folder (usually ~/NVIDIA_GPU_Computing_SDK/C and type 'make'.
  7. 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
  8. To print all you CUDA devices and their capabilities, try deviceQuery from SDK code samples. Type:
  9. You may want to check some other examples, for instance: