This is update from Install TensorFlow on ODROID-C2 to run Tensorflow 0.12 branch on ODROID-C2. Here is a steps to run tensorflow latest(around v0.12.1) only CPU build on ODROID-C2. Patches are more simple than past way.

In addition, I knew ODOROID-C2 can't run with 2GHz...



Use virtualenv to build modules.

  1. Build protobuf v3.0.2
  2. Build grpc-java compiler v1.0.3 with patch
  3. Build bazel v0.4.3 with patch
  4. Build tensorflow r0.12 branch

Pre Conditions

It is same as past environment See Install TensorFlow on ODROID-C2

virtualenv -p python3 --system-site-packages work
cd work
source bin/activate

Some Patches are uploaded

Build protobuf


git clone
cd protobuf
git checkout tags/v3.0.2
./configure --prefix=$(pwd)/../
make -j4
make install
cd ..

Build grpc-java compiler


I build v1.0.3 with protoc(v3.0.2) which is installed under work/bin.

git clone
cd grpc-java/
git checkout tags/v1.0.3


patch -p0 < ../../grpc-java.v1.0.3.patch

Build and install under bin directory

CXXFLAGS="-I$(pwd)/../include" LDFLAGS="-L$(pwd)/../lib" ./gradlew java_pluginExecutable -Pprotoc=$(pwd)/../bin/protoc
cp compiler/build/exe/java_plugin/protoc-gen-grpc-java ../bin/
cd ..

Build bazel

Buld bazel 0.4.3 with protoc and grpc-java

git clone
cd bazel
git checkout tags/0.4.3
patch -p0 < ../../bazel.0.4.3.patch
PROTOC=$(pwd)/../bin/protoc GRPC_JAVA_PLUGIN=$(pwd)/../bin/protoc-gen-grpc-java ./

Copy bazel into bin

cp output/bazel ../bin/
cd ..

Build tensorflow

Get source 0.12 branch and build. It does not need patch so far. If you use tags/v0.12.1, you have to fix the zlib address.

git clone --recurse-submodules
cd tensorflow
git checkout origin/r0.12

Configure and build

PYTHON_BIN_PATH=$(pwd)/../bin/python PYTHON_LIB_PATH=$(pwd)/../lib/python3.5/site-packages \
bazel build -c opt --local_resources 1536,0.5,1.0 --verbose_failures //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
cd ..

Finally install my build package and run example.

pip install /tmp/tensorflow_pkg/tensorflow-0.12.1-cp35-cp35m-linux_aarch64.whl
python lib/python3.5/site-packages/tensorflow/models/image/mnist/