-
Notifications
You must be signed in to change notification settings - Fork 124
/
build_all.sh
47 lines (41 loc) · 2.16 KB
/
build_all.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# External `build_all.sh`
set -ex
bash tensorflow_lite_support/custom_ops/tf_configure.sh
bazel build -c opt --config=monolithic \
//tensorflow_lite_support/java:tensorflowlite_support \
//tensorflow_lite_support/codegen/python:codegen \
//tensorflow_lite_support/metadata/java:tensorflowlite_support_metadata_lib \
//tensorflow_lite_support/metadata/cc:metadata_extractor \
//tensorflow_lite_support/custom_ops/kernel:all \
//tensorflow_lite_support/custom_ops/python:tflite_text_api \
//tensorflow_lite_support/cc/task/audio:audio_classifier \
//tensorflow_lite_support/cc/task/vision:image_embedder
# Build Task libraries.
bazel build -c opt --config=monolithic \
--config=android_arm64 --fat_apk_cpu=x86,x86_64,arm64-v8a,armeabi-v7a \
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/core:base-task-api.aar \
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/text:task-library-text \
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision:task-library-vision \
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/audio:task-library-audio
# Build desktop demos.
bazel build -c opt --config=monolithic \
//tensorflow_lite_support/examples/task/audio/desktop:audio_classifier_demo
bazel clean --expunge
# Build Coral plugin.
bazel build --sandbox_debug --subcommands --define=darwinn_portable=1 \
//tensorflow_lite_support/acceleration/configuration:edgetpu_coral_plugin