在Ubuntu中从源码编译TensorFlow

这里展示从源码编译得TensorFlow的过程。

原版教程在github上https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#installing-from-sources

首先是安装构建工具Bazel(http://www.bazel.io/docs/install.html#install-on-ubuntu)

Install on Ubuntu

Install JDK 8

If you are running Ubuntu Wily (15.10), you can skip this step. But for Ubuntu Trusty (14.04 LTS) users, since OpenJDK 8 is not available on Trusty, please install Oracle JDK 8:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
Note: You might need to sudo apt-get install software-properties-common if you don‘t have the add-apt-repository command. See here.

1. Add Bazel distribution URI as a package source (one time setup)

$ echo "deb http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
$ curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -
If you want to use the JDK 7, please replace jdk1.8 with jdk1.7 and if you want to install the testing version of Bazel, replace stable with testing.

2. Update and install Bazel

$ sudo apt-get update && sudo apt-get install bazel

Once installed, you can upgrade to newer version of Bazel with:

$ sudo apt-get upgrade bazel
时间: 2024-10-24 01:05:07

在Ubuntu中从源码编译TensorFlow的相关文章

Ubuntu14.04 64Bit 中从源码编译安装Gtk-3.16.3

(一)从源码编译安装GTK开发环境 为了便于获取源码,截止2015-05-26的gtk相关源码的存放于网盘中: 1. 相关网址 1)GTK+ Website 2)Compiling the GTK+ libraries  Overview of GTK+ and its Libraries 2.下载和编译源码包 1)下载源码:  (版本:gtk+-3.16.3.tar.xz) 2)解压配置gtk源码 $ tar xvfJ gtk+-3.16.3.tar.xz $ cd gtk+-3.16.3/

ubuntu 14.04 源码编译postgresql

环境 ubuntu 14.04 桌面版 postgresql 源码下载链接,本教程是使用postgresql 9.3.4 进行编译的 http://www.postgresql.org/ftp/source/ 首先我们需要给ubuntu 安装几个包,因为 postgresql 编译时依赖 install libreadline > apt-get install libreadline6 libreadline6-dev install zlib > apt-get install zlib1

ubuntu 上android 源码编译 全过程(一)

1.安装ubuntu系统 2.安装jdk环境 3.配置编译环境 4.解决编译过程中遇到的问题 5.编译成功 问题解决总结: 资源版本 开始用的ubuntu 14.10 遇到一个大问题搞了两天没弄好,建议不要选择14.10 问题是 build/core/prebuilt.mk:143:*** recipe commences before first target.停止 遇到这个问题的绕道吧(个人建议) 现在的环境情况: ubuntu12.04 .jdk1.6.33.源码4.0.3 -------

Ubuntu 16.04 源码编译安装PHP7

一.下载PHP7的最新版源码 php7.0.9  下载地址 http://php.net/get/php-7.0.9.tar.gz/from/a/mirror 二.解压 tar -zxf /tmp/php-7.0.9.tar.gz 三.安装相关依赖库 sudo apt-get update sudo apt-get install libxml2-dev #安装gcc sudo apt-get install build-essential sudo apt-get install openss

ubuntu linux下源码编译安装lamp环境

安装zlib库 tar -zvxf zlib-1.2.8.tar.gz cd zlib-1.2.8 ./configure make && make install 2.安装apache2.4.23 tar -zvxf httpd-2.4.23.tar.gz cd httpd-2.2.23 ./configure  --prefix=/usr/local/http2 \ --enable-modules=all \          //支持动态,静态加载模块 --enable-rewri

[环境配置]Ubuntu 16.04 源码编译安装OpenCV-3.2.0+OpenCV_contrib-3.2.0及产生的问题

1.OpenCV-3.2.0+OpenCV_contrib-3.2.0编译安装过程 1)下载官方要求的依赖包 GCC 4.4.x or later CMake 2.6 or higher Git GTK+2.x or higher, including headers (libgtk2.0-dev) # 控制opencv GUI pkg-config Python 2.6 or later and Numpy 1.5 or later with developer packages (pytho

ubuntu 16.04源码编译和配置caffe详细教程 | Install and Configure Caffe on ubuntu 16.04

本文首发于个人博客https://kezunlin.me/post/b90033a9/,欢迎阅读! Install and Configure Caffe on ubuntu 16.04 Series Part 1: Install and Configure Caffe on windows 10 Part 2: Install and Configure Caffe on ubuntu 16.04 Guide requirements: NVIDIA driver 396.54 CUDA 8

[Part 3] 在Ubuntu 16.04源码编译PCL 1.8.1支持VTK和QT

本文首发于个人博客https://kezunlin.me/post/137aa5fc/,欢迎阅读! Part-3: Install and Configure PCL 1.8.1 with vtk qt support on Ubuntu 16.04 from source Series Part-1: Install and Configure Qt5 on Ubuntu 16.04 Part-2: Install and Configure VTK 8.1.0 from source wit

Ubuntu/CentOS下源码编译安装Php 5.6基本参数

先确认安装libxml2 apt-get install libxml2 libxml2-dev或者yum install libxml2 libxml2-dev ./configure --prefix=/usr/local/include/php --with-pdo-mysql --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-zlib-dir --enable-xml --enable-bcmath