Posts

Compile TensorFlow Lite on mcOS Catalina

1. Download TensorFlow $ git clone https://github.com/tensorflow/tensorflow.git As of writing this post, I'm at commit 70e9708e234c86632e1f24b45e058cb87f8abe29 Date: Thu May 7 09:32:16 2020 -0700 2. Install Android SDK https://developer.android.com/studio The default location is ~/library/Android/Sdk 3. Extract Android NDK https://developer.android.com/ndk/downloads Extract this in ~/library/Android/Sdk/ndk-bundle 4. Install Bazel TF configure requires a very specific Bazel version. It is not "higher than X", but a specific version X. As of this writing, it's Bazel 3.0.0. https://docs.bazel.build/versions/master/install-os-x.html It should be at ~/bin/bazel 5. Configure TensorFlow $ cd tensorflow $ ./configure For most of those, go with the default until you see: > Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: y Configuration finished 6. Install numpy $ pip3 install numpy Successfully installed