From ec120d54f86d27546301b552cc780d87b859c6e7 Mon Sep 17 00:00:00 2001 From: Hannah Yan Date: Mon, 22 Jul 2024 17:48:32 +0100 Subject: [PATCH 1/3] Updated run-docker.sh to include values needed for verification --- run-docker.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/run-docker.sh b/run-docker.sh index 88fabff2fa..9dd6796782 100755 --- a/run-docker.sh +++ b/run-docker.sh @@ -265,6 +265,30 @@ if [ ! -z "$FINN_XILINX_PATH" ];then DOCKER_EXEC+="-e ALVEO_TARGET_DIR=$ALVEO_TARGET_DIR " fi fi + +# If using build verification, set up the necessary Docker variables +if [ "$VERIFICATION_EN" = 1 ]; then + if [ -z "$FINN_EXAMPLES_ROOT" ]; then + recho "FINN_EXAMPLES_ROOT path has not been set." + recho "Please set FINN_EXAMPLES_ROOT path to enable verification." + exit -1 + elif [ ! -d "${FINN_EXAMPLES_ROOT}/ci" ]; then + recho "ci folder not found in ${FINN_EXAMPLES_ROOT}." + recho "Please ensure the FINN-examples repo has been set up correctly, and FINN_EXAMPLES_ROOT path is set correctly, to enable verification." + exit -1 + elif [ -z "$VERIFICATION_IO" ]; then + recho "VERIFICATION_IO paths has not been set." + recho "Please ensure the path to the input and expected output files has been set correctly to eneable verification." + exit -1 + else + DOCKER_EXEC+="-e VERIFICATION_EN=$VERIFICATION_EN " + DOCKER_EXEC+="-e FINN_EXAMPLES_ROOT=$FINN_EXAMPLES_ROOT " + DOCKER_EXEC+="-e VERIFICATION_IO=$VERIFICATION_IO " + FINN_DOCKER_EXTRA+="-v $FINN_EXAMPLES_ROOT/ci:$FINN_EXAMPLES_ROOT/ci " + FINN_DOCKER_EXTRA+="-v $VERIFICATION_IO:$VERIFICATION_IO " + fi +fi + DOCKER_EXEC+="$FINN_DOCKER_EXTRA " if [ -z "$FINN_SINGULARITY" ];then From 6a4406d2d14da298648f0733ec0f744918b98806 Mon Sep 17 00:00:00 2001 From: auphelia Date: Tue, 23 Jul 2024 14:06:19 +0100 Subject: [PATCH 2/3] [Docker] Add additional comment to clarify that additions to bash script are for internal ci --- run-docker.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run-docker.sh b/run-docker.sh index 9dd6796782..0b45638bda 100755 --- a/run-docker.sh +++ b/run-docker.sh @@ -266,7 +266,8 @@ if [ ! -z "$FINN_XILINX_PATH" ];then fi fi -# If using build verification, set up the necessary Docker variables +# This part is used for internal ci for finn-examples +# if using build verification for finn-examples ci, set up the necessary Docker variables if [ "$VERIFICATION_EN" = 1 ]; then if [ -z "$FINN_EXAMPLES_ROOT" ]; then recho "FINN_EXAMPLES_ROOT path has not been set." @@ -289,6 +290,7 @@ if [ "$VERIFICATION_EN" = 1 ]; then fi fi + DOCKER_EXEC+="$FINN_DOCKER_EXTRA " if [ -z "$FINN_SINGULARITY" ];then From 65a356a08f73cb42d750106ffa84fcc0c401826a Mon Sep 17 00:00:00 2001 From: Hannah Yan Date: Thu, 25 Jul 2024 10:13:04 +0100 Subject: [PATCH 3/3] Updated run-docker.sh to check VERIFICATION_IO path --- run-docker.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run-docker.sh b/run-docker.sh index 0b45638bda..b1fe44eb0c 100755 --- a/run-docker.sh +++ b/run-docker.sh @@ -281,6 +281,10 @@ if [ "$VERIFICATION_EN" = 1 ]; then recho "VERIFICATION_IO paths has not been set." recho "Please ensure the path to the input and expected output files has been set correctly to eneable verification." exit -1 + elif [ ! -d "$VERIFICATION_IO" ]; then + recho "${VERIFICATION_IO} is not a directory." + recho "Please ensure the VERIFICATION_IO path has been set to the directory containing the input and expected output files for verification." + exit -1 else DOCKER_EXEC+="-e VERIFICATION_EN=$VERIFICATION_EN " DOCKER_EXEC+="-e FINN_EXAMPLES_ROOT=$FINN_EXAMPLES_ROOT "