ubuntu-14.04 installing the latest TensorFlow records

Source: Internet
Author: User


1. Install NVIDIA Drive
./nvidia-linux-x86_64-384.69.run
Nvidia-smi success indicates driver OK

2. Installing Cuda
Dpkg-i Cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64.deb
Apt-get Update
Apt-get Install Cuda
Install PATCH2 (can also not be installed) Dpkg-i Cuda-repo-ubuntu1404-8-0-local-cublas-performance-update_8.0.61-1_amd64.deb

3. Reduce the GCC version to less than 5.0 (ubuntu-14 not required because it is already gcc-4.8.4,ubuntu-16)
sudo apt-get install g++-4.9
sudo update-alternatives--install/usr/bin/gcc gcc/usr/bin/gcc-4.9 20
sudo update-alternatives--install/usr/bin/gcc gcc/usr/bin/gcc-5 10
sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-4.9 20
sudo update-alternatives--install/usr/bin/g++ g++/usr/bin/g++-5 10
sudo update-alternatives--install/usr/bin/cc CC/USR/BIN/GCC 30
sudo update-alternatives--set CC/USR/BIN/GCC
sudo update-alternatives--install/usr/bin/c++ C + +/usr/bin/g++ 30
sudo update-alternatives--set C + +/usr/bin/g++

4. Installing CUDNN
Tar zxf cudnn-8.0-linux-x64-v6.0.solitairetheme8
Copy the Cuda files to/usr/local/cuda.

5.python3 and TensorFlow
Apt-get Remove python2.7
Apt-get Install python3.5
Cd/usr/bin
Ln-s python3.5 python
Be sure to run the Python version 3.5.x
wget https://bootstrap.pypa.io/get-pip.py
Python get-pip.py
sudo pip3 install setuptools--upgrade
sudo pip3 install Ipython
Cp/usr/local/bin/pip3.5/usr/bin/pip3


6. Installing TensorFlow
PIP3 Install tensorflow-gpu==1.2
Description: tensorflow-1.2 is a 2017.6 released version and should be sufficient

7. Test:
$ python

>>> Import TensorFlow as TF
>>> Hello = tf.constant (' Hello, tensorflow! ')
>>> sess = tf. Session ()
>>> Sess.run (Hello)
' Hello, tensorflow! '
>>> a = tf.constant (10)
>>> B = tf.constant (32)
>>> Sess.run (A + B)
42
>>>

ubuntu-14.04 installing the latest TensorFlow records

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.