Skip to content

Commit 912cadf

Browse files
authored
Merge pull request Xilinx#1140 from hannahxy13/feature/validation_steps
Updated run-docker.sh to include values needed for verification
2 parents 2747853 + 65a356a commit 912cadf

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

run-docker.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,36 @@ if [ ! -z "$FINN_XILINX_PATH" ];then
265265
DOCKER_EXEC+="-e ALVEO_TARGET_DIR=$ALVEO_TARGET_DIR "
266266
fi
267267
fi
268+
269+
# This part is used for internal ci for finn-examples
270+
# if using build verification for finn-examples ci, set up the necessary Docker variables
271+
if [ "$VERIFICATION_EN" = 1 ]; then
272+
if [ -z "$FINN_EXAMPLES_ROOT" ]; then
273+
recho "FINN_EXAMPLES_ROOT path has not been set."
274+
recho "Please set FINN_EXAMPLES_ROOT path to enable verification."
275+
exit -1
276+
elif [ ! -d "${FINN_EXAMPLES_ROOT}/ci" ]; then
277+
recho "ci folder not found in ${FINN_EXAMPLES_ROOT}."
278+
recho "Please ensure the FINN-examples repo has been set up correctly, and FINN_EXAMPLES_ROOT path is set correctly, to enable verification."
279+
exit -1
280+
elif [ -z "$VERIFICATION_IO" ]; then
281+
recho "VERIFICATION_IO paths has not been set."
282+
recho "Please ensure the path to the input and expected output files has been set correctly to eneable verification."
283+
exit -1
284+
elif [ ! -d "$VERIFICATION_IO" ]; then
285+
recho "${VERIFICATION_IO} is not a directory."
286+
recho "Please ensure the VERIFICATION_IO path has been set to the directory containing the input and expected output files for verification."
287+
exit -1
288+
else
289+
DOCKER_EXEC+="-e VERIFICATION_EN=$VERIFICATION_EN "
290+
DOCKER_EXEC+="-e FINN_EXAMPLES_ROOT=$FINN_EXAMPLES_ROOT "
291+
DOCKER_EXEC+="-e VERIFICATION_IO=$VERIFICATION_IO "
292+
FINN_DOCKER_EXTRA+="-v $FINN_EXAMPLES_ROOT/ci:$FINN_EXAMPLES_ROOT/ci "
293+
FINN_DOCKER_EXTRA+="-v $VERIFICATION_IO:$VERIFICATION_IO "
294+
fi
295+
fi
296+
297+
268298
DOCKER_EXEC+="$FINN_DOCKER_EXTRA "
269299

270300
if [ -z "$FINN_SINGULARITY" ];then

0 commit comments

Comments
 (0)