Skip to content

Instantly share code, notes, and snippets.

@hohl
Last active January 17, 2020 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hohl/07d762510698bb87eafa69a3be7c7e6a to your computer and use it in GitHub Desktop.
Save hohl/07d762510698bb87eafa69a3be7c7e6a to your computer and use it in GitHub Desktop.
# According to the official "Build from source" steps:
# https://www.tensorflow.org/install/source
pip install -U 'future>=0.17.1'
pip install -U keras_applications --no-deps
pip install -U keras_preprocessing --no-deps
# My own additions
pip install -U numpy six wheel pip
# Download the TensorFlow 2.1 source:
curl -LO https://github.com/tensorflow/tensorflow/archive/v2.1.0.tar.gz
tar xvfz v2.1.0.tar.gz && rm v2.1.0.tar.gz && cd tensorflow-2.1.0
# Configure the build.
# When asked for the location of Python, make sure to enter the output of
# `which python`, otherwise it will use Python 2.x. You can press enter for
# most questions, but make sure to say `y` to CUDA and TensorRT.
./configure
# Build TensorFlow 2.1:
bazel build //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
# The PIP-wheel should no be ready under:
# /tmp/tensorflow_pkg/tensorflow-2.1.0-cp36-cp36m-linux_x86_64.whl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment