Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# get tensorflow
$ cd $HOME
$ git clone
$ cd tensorflow/
# (optional) select a branch, e.g., r1.2
$ git checkout r1.2
# without this step we stay at the master branch, equivelant to below
$ git checkout master
# clean previous bazel files
$ bazel clean
# configure installation
$ ./configure
# build installation package
# 1. To build with GPU support:
$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
# 2. To build with CPU support only:
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
# build wheel file
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
Thu Mar 16 21:06:02 NDT 2017 : === Building wheel
warning: no files found matching '*.dll' under directory '*'
warning: no files found matching '*.lib' under directory '*'
Thu Mar 16 21:07:15 NDT 2017 : === Output wheel file is in: /tmp/tensorflow_pkg
# install from pip (the .whl file name could be different)
$ pip install --user /tmp/tensorflow_pkg/tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment