TensorFlow1.4+CUDA8.0+OPENCV3.2+CuDNN5.1安装
2017-12-29 05:14
260 查看
摘抄自https://www.tensorflow.org/install/install_sources
其实没必要写本文的,安装比caffe简单多了。
Installing Bazel on Ubuntu
1. Install JDK 8
Install JDK 8 by using:sudo apt-get install openjdk-8-jdk
2. Add Bazel distribution URI as a package source (one time setup)
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
3. Install and update Bazel
sudo apt-get update && sudo apt-get install bazel
Once installed, you can upgrade to a newer version of Bazel with:
sudo apt-get upgrade bazel
Install python dependencies
sudo apt-get install python-numpy python-dev python-pip python-wheel
Optional: install TensorFlow for GPU prerequisites
sudo apt-get install libcupti-dev
Clone the TensorFlow repository
git clone https://github.com/tensorflow/tensorflow
cd tensorflow
git checkout
Build the pip package
To build a pip package for TensorFlow with CPU-only support,you would typically invoke the following command:$ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_packageTo build a pip package for TensorFlow with GPU support,invoke the following command:$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
Install the pip package
sudo pip install /tmp/tensorflow_pkg/tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whlValidate your installation
Change directory (cd) to any directory on your system other than the
tensorflowsubdirectory from which you invoked the
configurecommand.
Invoke python:$ pythonEnter the following short program inside the python interactive shell:
# Python import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))If the system outputs the following, then you are ready to begin writingTensorFlow programs:Hello, TensorFlow!
相关文章推荐
- ubuntu16.04:cuda8.0+python3.5+tensorflow1.4+opencv3.2安装说明
- win10下安装CUDA8.0+Cudnn5.1+tensorflow1.2.1
- ubuntu16.04上安装CUDA8.0 + cuDNN v6 + tensorflow-gpu1.4
- ubuntu14.04安装tensorflow+cuda8.0+cudnn5.1官方教程
- 深度学习入门之一:Windows10(64)+Anaconda3(Python3.5)+TensorFlow-Gpu1.4+CUDA8.0+cuDNN6安装详解及Pycharm配置指南
- [置顶] Ubuntu14.04安装cuda8.0+cudnn5.1+Tensorflow1.0.0(GPU)教程
- Ubuntu16.04+CUDA8.0+cudnn5.1+TensorFlow-GPU详细安装步骤
- 初用Linux, 安装Ubuntu16.04+NVIDIA387+CUDA8.0+cudnn5.1+TensorFlow1.0.1
- Ubuntu16.04.3LTS+CUDA8.0+cudnn5.1+tensorflow-gpu(1.2)安装配置信息汇总
- tensorflow1.4 WIN7环境下安装于配置CUDA 8.0 cuDNN6.0安装
- 从零开始安装TensorFlow1.0+keras(Ubuntu16.04+CUDA8.0+Cudnn5.1+TITANX)
- ubuntu14.04安装anaconda2.4.4.0 cuda8.0 cudnn5.1 tensorflow
- 初用Linux, 安装Ubuntu16.04+NVIDIA387+CUDA8.0+cudnn5.1+TensorFlow1.0.1
- ubuntu14.04安装nvidia驱动,cuda8.0,cudnn5.1和tensorflow教程
- ubuntu 14 cuda8.0 cudnn5.1 anaconda tensorflow opencv 的安装
- Ubuntu16.04LTS+CUDA8.0+cuDNN5.1+Anaconda3(python3.6)+tensorflow_gpu-1.2.1安装过程全记录
- (亲测可用)ubuntu16.04安装+cuda8.0+cudnn5.1+MXNET gpu版本安装+tensorflow gpu版本安装+chainerGPU版本安装
- 在win10下安装Tensorflow(CUDA8.0+cuDNN5.1)
- ubuntu14.04+GTX1080+cuda8.0+cudnn5.1+源码编译tensorflow安装教程
- Windows10上安装 TensorFlow1.4 + CUDA8.0 + cudnn6.0