diff options
author | SaeHie Park <saehie.park@samsung.com> | 2018-02-27 17:33:07 +0900 |
---|---|---|
committer | 박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com> | 2018-02-27 17:46:36 +0900 |
commit | 9ed0495e7bc6c0003920ef217007b8d3c1c1fe66 (patch) | |
tree | 80143a50bc7743aea2683036a63d03e3ae1a8cc6 | |
parent | 5d1366f3240b2e78d3f3804a6b8dfc6ba8bf7b1c (diff) | |
download | nnfw-9ed0495e7bc6c0003920ef217007b8d3c1c1fe66.tar.gz nnfw-9ed0495e7bc6c0003920ef217007b8d3c1c1fe66.tar.bz2 nnfw-9ed0495e7bc6c0003920ef217007b8d3c1c1fe66.zip |
Add build TF from source document
This will add a document how to build TensorFlow and TOCO tool from source
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | docs/BuildTFfromSource.md | 66 |
2 files changed, 70 insertions, 0 deletions
@@ -64,3 +64,7 @@ you should also give this to makefile. ROOTFS_DIR=/home/user/rootfs/arm-xenial BUILD_HOST=armv7l make ROOTFS_DIR=/home/user/rootfs/arm-xenial BUILD_HOST=armv7l make install ``` + +# Other how-to documents + +[Building TensorFlow and TOCO from source](docs/BuildTFfromSource.md) diff --git a/docs/BuildTFfromSource.md b/docs/BuildTFfromSource.md new file mode 100644 index 000000000..9626c6a14 --- /dev/null +++ b/docs/BuildTFfromSource.md @@ -0,0 +1,66 @@ +# Building TensorFlow and TOCO from source + +You can build TensorFlow and tools including `TOCO` from source. +Please read +[Installing TensorFlow from Sources](https://www.tensorflow.org/install/install_sources) +for full description. + +## Install Bazel + +Follow [Installing Bazel](https://docs.bazel.build/versions/master/install.html) +- For Ubuntu, follow [Installing Bazel on Ubuntu](https://docs.bazel.build/versions/master/install-ubuntu.html) + +These are the actual steps to install using apt package manager: +``` +sudo apt-get install openjdk-8-jdk +``` +``` +echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" \ +| sudo tee /etc/apt/sources.list.d/bazel.list +curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - +``` +``` +sudo apt-get update && sudo apt-get install bazel +``` +``` +sudo apt-get upgrade bazel +``` + +## Install python packages + +``` +sudo apt-get install python-numpy python-dev python-pip python-wheel +``` + +## Configure + +``` +cd external/tensorflow +./configure +``` + +Select options like this page: https://www.tensorflow.org/install/install_sources#ConfigureInstallation + +## Build with Bazel + +``` +bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package +bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg +``` + +If you have any problems while building, please fire an issue. + +## Uninstall if already installed + +You may skip this if you haven't installed +``` +pip uninstall /tmp/tensorflow_pkg/tensorflow-1.6.0rc0-cp27-cp27mu-linux_x86_64.whl +``` + +## Install TensorFlow and tools + +``` +pip install /tmp/tensorflow_pkg/tensorflow-1.6.0rc0-cp27-cp27mu-linux_x86_64.whl --user +``` + +You should see installed `toco` at `~/.local/bin` folder. |