Mac OS X 安装
1:安装Bazel
1. Install Homebrew on Mac OS X (one time setup)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. Install Bazel using Homebrew
$ brew install bazel
Once installed, you can upgrade to newer version of Bazel with:
$ brew upgrade bazel
2:SWIG
http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz
$ ./configure $ make $ make install
3:
bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
遇到问题:
ERROR: /Users/aiven/Works/openSource/deepLearning/tensorflow/tensorflow/core/distributed_runtime/rpc/BUILD:199:1: no such package '@grpc//': Error cloning repository: SSL peer shut down incorrectly caused by SSL peer shut down incorrectly caused by SSL peer shut down incorrectly and referenced by '//tensorflow/core/distributed_runtime/rpc:grpc_master_service_impl'.
解决方法:
For git 1.6.1 or above you can use something similar to (modified to suit):
git submodule foreach git pull origin master
4:
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg