Tensorflow 源码安装 ubuntu16.04 GPU

Tensorflow 安装与使用 (ubuntu16.04 GPU)

%#################################################################%

由于计算机里已安装 caffe, cuda, cudnn, 为了安装tensorflow后不影响其使用,所以在anaconda中新建了一个环境,名称:tensorflow, 建完之后选择 numpy 安装

这里写图片描述

%#################################################################%

查看cuda版本 cat /usr/local/cuda/version.txt
查看cudnn版本 cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

本计算机 cuda: 8.0 cudnn: 5.1.5

这里写图片描述

%#################################################################%

激活环境
source activate tensorflow

下载安装Bazel,Bazel是Google开源构建工具,类似于Make的工具,用来编译构建tensorflow

官网提供的地址一直连接不上,放在百度网盘里(bazel-0.5.4-installer-linux-x86_64.sh):https://pan.baidu.com/s/1o93507o

放在主目录文件夹 /tensorflow_install 下,执行

cd /home/majinlei/tensorflow_install

chmod +x bazel-0.5.4-installer-linux-x86_64.sh

./bazel-0.5.4-installer-linux-x86_64.sh --user

export PATH="$PATH:$HOME/bin"

执行上述 4 个命令之后开始配置(不要使用sudo ./configure)

./configure

具体配置选择如下:

(tensorflow) majinlei@majinlei:~/tensorflow$ ./configure
WARNING: Running Bazel server needs to be killed, because the startup options are different.
You have bazel 0.5.4 installed.
Please specify the location of python. [Default is /home/majinlei/anaconda2/envs/tensorflow/bin/python]: /home/majinlei/anaconda2/envs/tensorflow/bin/python


Found possible Python library paths:
  /usr/local/lib/python2.7/site-packages
  /home/majinlei/anaconda2/envs/tensorflow/lib/python2.7/site-packages
Please input the desired Python library path to use.  Default is [/usr/local/lib/python2.7/site-packages]
/home/majinlei/anaconda2/envs/tensorflow/lib/python2.7/site-packages
Do you wish to build TensorFlow with jemalloc as malloc support? [Y/n]: y
jemalloc as malloc support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Google Cloud Platform support? [Y/n]: y
Google Cloud Platform support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Hadoop File System support? [Y/n]: y
Hadoop File System support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Amazon S3 File System support? [Y/n]: y
Amazon S3 File System support will be enabled for TensorFlow.

Do you wish to build TensorFlow with XLA JIT support? [y/N]: y
XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with GDR support? [y/N]: y
GDR support will be enabled for TensorFlow.

Do you wish to build TensorFlow with VERBS support? [y/N]: y
VERBS support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: n
No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.

Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to default to CUDA 9.0]: 8.0


Please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda


Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值