Creating an image classifier on Android using TensorFlow (part 2)

Rebuild the TensorFlow demo app from source

$ docker run hello-world | grep Hello
$ docker pull danjarvis/tensorflow-android:1.0.0
$ docker run -it danjarvis/tensorflow-android:1.0.0
Hello from TensorFlow. Everything seems to be working!

Building the TensorFlow project

# find /tensorflow/ -name
# vi /tensorflow/tensorflow/examples/android/src/org/tensorflow/demo/
# cd /tensorflow
# bazel build -c opt --local_resources 4096,4.0,1.0 -j 1 //tensorflow/examples/android:tensorflow_demo
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS 68f8994d3b19 <image>:<version> "/bin/bash" 7 hours ago Up 7 hours
$ docker cp 68f8994d3b19:/tensorflow/bazel-bin/tensorflow/examples/android/tensorflow_demo.apk /tmp/
$ adb install -r /tmp/tensorflow_demo.apk



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store