Build from source for the Raspberry Pi

This guide builds a TensorFlow package for a
Raspberry Pi device running
Raspbian 9.0.
While the instructions might work for other Raspberry Pi variants, it is only
tested and supported for this configuration.

We recommend cross-compiling the TensorFlow Raspbian package. Cross-compilation
is using a different platform to build the package than deploy to. Instead of
using the Raspberry Pi's limited RAM and comparatively slow processor, it's
easier to build TensorFlow on a more powerful host machine running Linux, macOS,
or Windows.

Download the TensorFlow source code

The repo defaults to the master development branch. You can also checkout a
release branch
to build:

git checkout branch_name # r1.9, r1.10, etc.

Key Point: If you're having build problems on the latest development branch, try
a release branch that is known to work.

Build from source

Cross-compile the TensorFlow source code to build a Python pip package with
ARMv7 NEON instructions
that works on Raspberry Pi 2 and 3 devices. The build script launches a Docker
container for compilation. Choose between Python 3 and Python 2.7 for the target
package: