From 7dbe1089a6c7607725f690a0861392b8e90fb94f Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 31 Jan 2024 11:49:22 +0100 Subject: [PATCH] feat: Use native `TensorFlowLiteC` library from source --- scripts/build-tensorflow-android.sh | 26 ++++++++++++++++++++++++++ scripts/build-tensorflow-ios.sh | 17 ++++++++++------- 2 files changed, 36 insertions(+), 7 deletions(-) create mode 100755 scripts/build-tensorflow-android.sh diff --git a/scripts/build-tensorflow-android.sh b/scripts/build-tensorflow-android.sh new file mode 100755 index 000000000..a2c07082c --- /dev/null +++ b/scripts/build-tensorflow-android.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" + +read -p "Did you run ./configure with iOS + Android in /tensorflow/ already? [yN]: " -n 1 -r +echo "" +if [[ $REPLY =~ ^[Yy]$ ]] +then + # Assumes the user ran ./configure in tensorflow/ already + cd tensorflow + + bazel build --config=android # -c opt --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteC_framework + + cd .. + + cp -f -r tensorflow/bazel-bin/tensorflow/lite/android/ android/ + + echo "What now?" +fi diff --git a/scripts/build-tensorflow-ios.sh b/scripts/build-tensorflow-ios.sh index 791a3151a..97cda86d0 100755 --- a/scripts/build-tensorflow-ios.sh +++ b/scripts/build-tensorflow-ios.sh @@ -1,13 +1,16 @@ #!/bin/bash -echo "Did you run ./configure in ./tensorflow/ already?" -echo "Did you run ./configure in ./tensorflow/ already?" -echo "Did you run ./configure in ./tensorflow/ already?" -echo "Did you run ./configure in ./tensorflow/ already?" -echo "Did you run ./configure in ./tensorflow/ already?" -echo "Did you run ./configure in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" +echo "Did you run ./configure with iOS + Android support in ./tensorflow/ already?" -read -p "Did you run ./configure in /tensorflow/ already? [yN]: " -n 1 -r +read -p "Did you run ./configure with iOS + Android in /tensorflow/ already? [yN]: " -n 1 -r +echo "" if [[ $REPLY =~ ^[Yy]$ ]] then # Assumes the user ran ./configure in tensorflow/ already