No edit summary
No edit summary
Line 20: Line 20:


<pre>bazel build --jobs 2 //tensorflow/tools/pip_package:build_pip_package</pre>
<pre>bazel build --jobs 2 //tensorflow/tools/pip_package:build_pip_package</pre>
I got compilation errors at one point and some guidance said to add the following to the command to reduce memory consumption:
<pre>bazel build --jobs 2 --local_resources 2048,.5,1.0 //tensorflow/tools/pip_package:build_pip_package</pre>

Revision as of 13:26, 24 September 2020

Tensorflow packages often assume the processor supports avx2. Our Xeon process does not, and requires tensorflow to be compiled without this flag.

Verify dependencies

sudo apt install python3-dev python3-pip

Install Bazel using Bazelisk

sudo npm install -g @bazel/bazelisk

Checkout Tensorflow

git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow

Configure

Keep all defaults

./configure

Compile

The jobs parameter may be needed to reduce memory dependencies on some servers

bazel build --jobs 2 //tensorflow/tools/pip_package:build_pip_package

I got compilation errors at one point and some guidance said to add the following to the command to reduce memory consumption:

bazel build --jobs 2 --local_resources 2048,.5,1.0 //tensorflow/tools/pip_package:build_pip_package