From d38f51e12d77d9f613069ec68245238c93b1975f Mon Sep 17 00:00:00 2001 From: Thai Nguyen Date: Wed, 12 Aug 2020 22:43:24 -0700 Subject: [PATCH] Avoid passing --checkpoint to the build script PiperOrigin-RevId: 326385936 Change-Id: I660fcce3ba43beeea9f49a5357aeb3551f2b36b0 --- tensorflow/lite/tools/build_aar_with_docker.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tensorflow/lite/tools/build_aar_with_docker.sh b/tensorflow/lite/tools/build_aar_with_docker.sh index 2af4787c35c..094406e2076 100755 --- a/tensorflow/lite/tools/build_aar_with_docker.sh +++ b/tensorflow/lite/tools/build_aar_with_docker.sh @@ -35,6 +35,7 @@ function print_usage { # Check command line flags. ARGUMENTS=$@ +BUILD_FLAGS="" TARGET_ARCHS=x86,x86_64,arm64-v8a,armeabi-v7a FLAG_CHECKPOINT="master" @@ -48,9 +49,11 @@ do case $i in --input_models=*) FLAG_MODELS="${i#*=}" + BUILD_FLAGS="${BUILD_FLAGS} ${i}" shift;; --target_archs=*) TARGET_ARCHS="${i#*=}" + BUILD_FLAGS="${BUILD_FLAGS} ${i}" shift;; --checkpoint=*) FLAG_CHECKPOINT="${i#*=}" @@ -67,7 +70,7 @@ if [ ! -d /tensorflow_src ]; then do FLAG_DIR="${FLAG_DIR} -v ${model}:${model}" done - docker run --rm -it -v $PWD:/tmp -v ${SCRIPT_DIR}:/script_dir ${FLAG_DIR} \ + docker run --rm -it -v $PWD:/host_dir -v ${SCRIPT_DIR}:/script_dir ${FLAG_DIR} \ --entrypoint /script_dir/build_aar_with_docker.sh tflite-builder \ ${ARGUMENTS} exit 0 @@ -97,7 +100,7 @@ else git checkout ${FLAG_CHECKPOINT} # Building with bazel. - bash /tensorflow_src/tensorflow/lite/tools/build_aar.sh ${ARGUMENTS} + bash /tensorflow_src/tensorflow/lite/tools/build_aar.sh ${BUILD_FLAGS} # Copy the output files from docker container. clear @@ -107,7 +110,7 @@ else for i in ${OUT_FILES} do if [ -f $i ]; then - cp $i /tmp + cp $i /host_dir basename $i fi done