From 210897d7afb4007fe06d390c2ec333a732390b5c Mon Sep 17 00:00:00 2001 From: James Conroy Date: Thu, 4 Aug 2022 16:55:05 +0100 Subject: IVGCVSW-6777 Add Arm NN build-tool Dockerfile * Adds Dockerfile associated with Arm NN build-tool scripts. * The Dockerfile encapsulates the installation of system-wide packages (install-packages.sh), download/install of Arm NN dependencies (setup-armnn.sh) and the building of Arm NN and ACL (build-armnn.sh). * A helper script for copying build contents from the built Docker image is provided for by docker-copy-to-host.sh. * Modified existing scripts: moved the cloning of Arm NN and ACL from setup-armnn.sh to build-armnn.sh and decoupled setup-armnn.sh from scripts outside of build-tool directory e.g. armnn/scripts/get_tensorflow.sh. * The build-armnn.sh script clones the latest release branches of Arm NN and ACL by default. Custom repos can be placed in the build-tool directory prior to 'docker build' and they will be used instead (advanced usage). * Support added for Linux targets only, Android to be added in future work. Signed-off-by: James Conroy Change-Id: I336013cf93821d2cd3e5d9fe2ca4e955ffdd2386 --- build-tool/scripts/common.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'build-tool/scripts/common.sh') diff --git a/build-tool/scripts/common.sh b/build-tool/scripts/common.sh index 522bfb68cd..f9f8f974aa 100755 --- a/build-tool/scripts/common.sh +++ b/build-tool/scripts/common.sh @@ -47,6 +47,7 @@ FLATBUFFERS_BUILD_TARGET="$FLATBUFFERS_BUILD_ROOT"/"$TARGET_ARCH"_build FLATBUFFERS_BUILD_HOST="$FLATBUFFERS_BUILD_ROOT"/"$HOST_ARCH"_build # Location of flatc compiler # Tensorflow +TENSORFLOW_VERSION="tags/v2.5.0" TENSORFLOW_SRC="$SOURCE_DIR"/tensorflow TFLITE_SRC="$TENSORFLOW_SRC"/tensorflow/lite SCHEMA_SRC="$TFLITE_SRC"/schema/schema.fbs @@ -72,4 +73,18 @@ ONNX_BUILD_TARGET="$BUILD_DIR"/onnx/"$TARGET_ARCH"_build # Arm NN / ACL ARMNN_SRC="$SOURCE_DIR"/armnn -ACL_SRC="$SOURCE_DIR"/acl \ No newline at end of file +ACL_SRC="$SOURCE_DIR"/acl + +# Check if directory at $1 is a repository or not +check_if_repository() +{ + pushd "$1" > /dev/null + + if [ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" ]; then + popd > /dev/null + return 0 + else + popd > /dev/null + return 1 + fi +} \ No newline at end of file -- cgit v1.2.1