Ubuntu14.04 installation CUDA-7.5 (deb installation) +tensorflow

Source: Internet
Author: User
Tags cuda toolkit

System: Ubuntu14.04 64-bit

1. Install Cuda

Graphics Card: GTX 1080

In order to test whether the video card is normal, first installed a 352 driver, using Ubuntu's default source, it is convenient to complete the installation.

# Pre-conditions in official notes
apt-get install gcc g++ linux-headers-$ (uname-r)

apt-get Install nvidia-352
1 2 3 4

Then install the Cuda library, which uses the latest cuda-7.5 toolkit.

wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-ubuntu1404-7-5-local _7.5-18_amd64.deb

dpkg-i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb

apt-get update

Apt-get Install Cuda
1 2 3 4 5 6 7

Modify environment variables so that you can directly use the commands in the Cuda Toolkit.

Vim ~/.BASHRC
1

Add the following four lines.

Export cuda_home=/usr/local/cuda-7.5
export ld_library_path=${cuda_home}/lib64 
path=${cuda_home}/bin:${ PATH}
Export path
1 2 3 4

Make the changes take effect.

SOURCE ~/.BASHRC
1

Run the Official sample program

cuda-install-samples-7.5.sh ~ CD
~/nvidia_cuda-7.5_samples

cd 1_utilities/devicequery
make
CD ~/ Nvidia_cuda-7.5_samples/bin/x86_64/linux/release
./devicequery

CD ~/nvidia_cuda-7.5_samples/1_utilities /bandwidthtest
make
./bandwidthtest
1 2 3 4 5 6 7 8 9 10 11

If two test results are pass, it means that Cuda is running normally.

Reference links

Cuda-7.5-toolkit

2. Install TensorFlow

Essential Python-pip and Python-dev. in this window, enter the command: $ sudo apt-get install Python-pip python-dev

Notice that there is already a $ symbol in the window, so you don't have to include the $ symbol when you copy or enter the command, but the online tutorials usually include this symbol as a sign. Just pay attention.

The command's first sudo means that this command will execute as root, so you need to enter the password you started with, and note that the input process is not displayed on the screen. After the loss of direct press ENTER on the line.

Direct delivery command: $ sudo pip install--upgrade https://storage.googleapis.com/tensorflow/linux/gpu/ Tensorflow-0.11.0rc0-cp27-none-linux_x86_64.whl

If the command line download does not come down, you can download the TENSORFLOW-0.11.0RC0-CP27-NONE-LINUX_X86_64.WHL first and then install.

Test after Setup completes:

In the terminal, enter Python, enter the python compilation environment, and enter:

Import TensorFlow as TF

TensorFlow package, if there is no error, the installation is successful, otherwise there is a problem.

You can then enter

tf.__version__
tf.__path__

View the installation version and installation path of the TensorFlow (two bottom horizontal lines).

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.