Skip to content

Commit

Permalink
[Infra] Add no-cache env var for run docker script
Browse files Browse the repository at this point in the history
  • Loading branch information
auphelia committed Oct 24, 2024
1 parent dd0655b commit 14b68b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ SCRIPTPATH=$(dirname "$SCRIPT")
: ${FINN_SINGULARITY=""}
: ${FINN_SKIP_XRT_DOWNLOAD=""}
: ${FINN_XRT_PATH=""}
: ${FINN_DOCKER_NO_CACHE="0"}

DOCKER_INTERACTIVE=""

Expand Down Expand Up @@ -190,12 +191,18 @@ if [ -d "$FINN_XRT_PATH" ];then
export LOCAL_XRT=1
fi

if [ "$FINN_DOCKER_NO_CACHE" = "1" ]; then
export NO_CACHE_STRING="--no-cache"
else
export NO_CACHE_STRING=""
fi

# Build the FINN Docker image
if [ "$FINN_DOCKER_PREBUILT" = "0" ] && [ -z "$FINN_SINGULARITY" ]; then
# Need to ensure this is done within the finn/ root folder:
OLD_PWD=$(pwd)
cd $SCRIPTPATH
docker build -f docker/Dockerfile.finn --build-arg XRT_DEB_VERSION=$XRT_DEB_VERSION --build-arg SKIP_XRT=$FINN_SKIP_XRT_DOWNLOAD --build-arg LOCAL_XRT=$LOCAL_XRT --tag=$FINN_DOCKER_TAG $FINN_DOCKER_BUILD_EXTRA .
docker build -f docker/Dockerfile.finn --build-arg XRT_DEB_VERSION=$XRT_DEB_VERSION --build-arg SKIP_XRT=$FINN_SKIP_XRT_DOWNLOAD --build-arg LOCAL_XRT=$LOCAL_XRT --tag=$FINN_DOCKER_TAG $FINN_DOCKER_BUILD_EXTRA $NO_CACHE_STRING .
cd $OLD_PWD
fi

Expand Down

0 comments on commit 14b68b7

Please sign in to comment.