在centos6环境下安装TensorFlow
来源:互联网 发布:星野ナミ 知乎 编辑:程序博客网 时间:2024/06/06 06:30
The official-released binary packages of TensorFlow are built for newer version of Linux distros. Here is how to build TensorFlow binary package for CentOS 6.
Install Dependencies
Admin privilege is required here.
OpenJDK (for Bazel)
Developer Toolset (for Bazel and TensorFlow)
C++11 compatible compiler is required during the building process. Follow the instructions in this article to install Developer Toolset. It is worth noting that, in this case, installing just devtoolset-6-toolchain
would be sufficient.
Python 2.7 (for TensorFlow)
This step also requires Software Collections installed. Therefore, if you’ve installed Developer Toolset by following the instructions above, you should have no problem installing these dependencies.
Build and Install Bazel
Enter Build Environment
Enter Software Collection environment with Developer Toolset.
Prepare Source Code
Method 1 (Recommended)
The standard way of compiling a release version of Bazel from source is to use a distribution archive. From version 0.4.1, bootstrapping Bazel from GitHub repository is no longer supported as only the distribution archives contain generated artifacts required for direct compilation. Download bazel-<VERSION>-dist.zip
from the release page.
Method 2 (Only Works for Version <= 0.4.0)
Build and Install
Build TensorFlow with Bazel
Enter Build Environment
Enter Software Collection environment with Developer Toolset and Python 2.7.
Prepare Source Code
Since GNU C library version in CentOS 6 is less than 2.17, a slight modification needs to be applied before compilation.
Modify tf_extension_linkopts
function in tensorflow/tensorflow.bzl
from
to
Build
After above modification, we can now start building!
Remember to disable jemalloc when configuring — otherwise the build will fail.
Finishing Up
Finally, you will found a tensorflow-1.1.0-cp27-none-linux_x86_64.whl
(filename may vary upon versions) in /tmp/tensorflow_pkg/
. With this self-built binary package, we can now deploy TensorFlow to CentOS 6 by pip
.
Enter Python Environment on Deployment Target
Enter Python 2.7 environment either by Software Collection or by tools like pyenv.
Install
Depending on your environment setup, admin privilege might be needed here.
References
- Installing TensorFlow from Sources – TensorFlow
- Compiling from source – Installing Bazel – Bazel
- Distribution Artifact for Bazel – Bazel
- ImportError: undefined symbol: clock_gettime #121
- 在centos6环境下安装TensorFlow
- 在gentoo环境下安装tensorflow
- tensorflow在windows环境下的安装
- 在linux环境下安装tensorflow
- hadoop在centos6.7下安装下环境配置问题
- flask框架在centos6.5环境下安装配置
- 在centos6.5 环境下安装scikit-learn
- thrift在centos6.5下编译环境的安装
- 在CentOS6.3环境下安装VNC报错
- CloudStack4.8在CentOS6.6下安装环境配置
- 在centos6.5下编译安装LNMP环境(更新)
- 在CentOS6.5环境下编译安装MySQL5.6.34
- 在ubuntu环境下安装cpu版本的tensorflow
- 在windows下安装opencv3+tensorflow的python开发环境
- Tensorflow在Anaconda环境下安装以及一些问题【转】
- TensorFlow在windows环境下的安装(1)
- Win10在anaconda集成环境下安装tensorflow
- Windows环境下安装Tensorflow
- ajax post 后台收不到数据
- 357. Count Numbers with Unique Digits
- java账号登录时的验证
- 预览页面中的图片。并且图片的位置始终处在屏幕中间
- Java 8 foreach
- 在centos6环境下安装TensorFlow
- JS数组中元素数字和字符串之间的转换
- jquery选择器整理
- Logstash通过TCP获取log4j日志
- 【面试题18】树的子结构
- SpringBoot事务管理:声明式事务和编程式事务。将Service层的事务执行结果传递出去
- unbuntu16.04安装elasticsearch5
- 锁 Lock
- Android使用FFmpeg 解码H264并播放(一)