aboutsummaryrefslogtreecommitdiff
path: root/build-tool/scripts/common.sh
diff options
context:
space:
mode:
authorJames Conroy <james.conroy@arm.com>2022-08-04 16:55:05 +0100
committerNikhil Raj <nikhil.raj@arm.com>2022-08-05 16:33:41 +0100
commit210897d7afb4007fe06d390c2ec333a732390b5c (patch)
treefc172104328e511c3c262135f40cba0f25a96068 /build-tool/scripts/common.sh
parentdba6773af86ac3f79171503fd3b48b0bd1618239 (diff)
downloadarmnn-210897d7afb4007fe06d390c2ec333a732390b5c.tar.gz
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 <james.conroy@arm.com> Change-Id: I336013cf93821d2cd3e5d9fe2ca4e955ffdd2386
Diffstat (limited to 'build-tool/scripts/common.sh')
-rwxr-xr-xbuild-tool/scripts/common.sh17
1 files changed, 16 insertions, 1 deletions
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