Install and configure CUDA in Ubuntu 14.04

Source: Internet
Author: User
Tags linux mint

Install and configure CUDA in Ubuntu 14.04

First, I installed Ubuntu 14.04.1.

1. Pre-Check

Check the system as shown in reference 1.

Run the following command:

:~ $ Lspci | grep-I nvidia
. 0 3D controller: NVIDIA Corporation GK110GL [Tesla K20c] (rev a1)
. 0 VGA compatible controller: NVIDIA Corporation gk0000gl [Quadro K4000] (rev a1)
. 1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller (rev a1)

Two GPUs, K20 and K4000, and an Audio, should be the sound card.

Then, run the command to check the system version:

~ $ Uname-m & cat/etc/* release
X86_64
DISTRIB_ID = Ubuntu
DISTRIB_RELEASE = 14.04
DISTRIB_CODENAME = trusty
DISTRIB_DESCRIPTION = "Ubuntu 14.04.1 LTS"
NAME = "Ubuntu"
VERSION = "14.04.1 LTS, Trusty Tahr"
ID = ubuntu
ID_LIKE = debian
PRETTY_NAME = "Ubuntu 14.04.1 LTS"
VERSION_ID = "14.04"
HOME_URL = "http://www.ubuntu.com /"
SUPPORT_URL = "http://help.ubuntu.com /"
BUG_REPORT_URL = "http://bugs.launchpad.net/ubuntu"

We can see that the machine version is ubuntu14.04.

Then, use gcc -- version to check whether the gcc version meets the requirements in connection 1:

~ $ Gcc -- version
Gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
Warranty; not even for MERCHANTABILITY or fitness for a particle PURPOSE.

After checking, go to the nvidia website (refer to link 3) to download the driver, which is the deb package of ubuntu14.04.

-------------------------------------- Split line --------------------------------------

CUDA programming in Ubuntu 12.04

Ubuntu 12.04 installation CUDA-5.5

Install the CUDA Development Environment on Ubuntu 11.10

Configure the CUDA environment in the 15 ora 15 System

Install nvidia cuda 11.04 RC2 in Ubuntu 4.0

Configure CUDA 12.04 & OpenCV 2.4.2 in Linux Mint 13/Ubuntu 4.2

CUDA getting started

-------------------------------------- Split line --------------------------------------

2. Installation
Deb package installation is relatively simple, but the installation process prompts instability, but there is nothing wrong with it.

Follow the instructions in link 2 to install the necessary libraries.

Sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

Or follow the process on the official website.

$ Sudo dpkg-I cuda-repo-<distro >_< version >_< architecture>. deb
$ Sudo apt-get update
$ Sudo apt-get install cuda


It may take a long time to download the file, but it doesn't matter.


If the installation is complete.


Prompt during installation:

* ** Please reboot your computer and verify that the nvidia graphics driver is loaded .***
*** If the driver fails to load, please use the NVIDIA graphics driver. run installer ***
* ** To get into a stable state.

I'm not sure. I am prompted that the. run installation is relatively stable, but I am using it now.

3. Configure the environment

My system is 64-bit, so add it to. bashrc When configuring the environment

$ Export PATH =/usr/local/cuda-6.5/bin: $ PATH
$ Export LD_LIBRARY_PATH =/usr/local/cuda-6.5/lib64: $ LD_LIBRARY_PATH

After the environment is configured, execute the command

~ $ Source. bashrc

Make it take effect immediately.

4. install sample

After the environment is configured, run the following command:

$ Cuda-install-samples-6.5.sh <dir>

In this way, the cuda sample is copied to the dir folder. This command is only a copy operation.

Then enter the folder and execute the make command to compile. The compilation takes a long time and you need to wait.

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.