-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathbuild-tensorflow-ios.sh
executable file
·28 lines (21 loc) · 1 KB
/
build-tensorflow-ios.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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?"
read -p "Did you run ./configure in /tensorflow/ already? [yN]: " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
# Assumes the user ran ./configure in tensorflow/ already
cd tensorflow
bazel build --config=ios_fat -c opt --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteC_framework
bazel build --config=ios_fat -c opt --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteCCoreML_framework
cd ..
cp -f -r tensorflow/bazel-bin/tensorflow/lite/ios/ ios/
unzip -o ios/TensorFlowLiteC_framework.zip -d ios
rm ios/TensorFlowLiteC_framework.zip
unzip -o ios/TensorFlowLiteCCoreML_framework.zip -d ios
rm ios/TensorFlowLiteCCoreML_framework.zip
fi