- make sure the depends updated
such as bazel >= 0.5.0, python >= 2.7 and numpy installed.
- download src
tensorflow src tensorflow and offline third party package tensorflow_third_party and extract. The extracted directories are $tf and $tp, and must be absolute path.
- fix the build,do as
git clone https://github.com/amutu/tensorflow-offline.git
cd tensorflow-offline
git submodule update
./fix_offline_build.sh $tf $tp
- do the build
cd $tf && ./configure
bazel --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures
bazel-bin/tensorflow/tools/pip_package/build_pip_package
- note: test tensorflow-1.2.0 on FreeBSD without CUDA,openCL,XLA support.Linux or other Unix should work too.