1.安装编译工具bazel,具体可以参照官方教程。
https://docs.bazel.build/versions/master/install-ubuntu.html
2. 配置tensorflow的编译环境
运行tensorflow目录下的configure文件,根据自己的环境进行配置。比如下面这样:
**root@fly-virtual-machine:/home/share/tensorflow# ./configure**
Please specify the location of python. [Default is /root/anaconda3/bin//python]: /root/anaconda3/bin/python
**Do you wish to use jemalloc as the malloc implementation? (Linux only) [Y/n] y**
jemalloc enabled on Linux
**Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] n**
No Google Cloud Platform support will be enabled for TensorFlow
**Do you wish to build TensorFlow with Hadoop File System support? [y/N] n**
No Hadoop File System support will be enabled for TensorFlow
**Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] n**
No XLA JIT support will be enabled for TensorFlow
Found possible Python lib