Skip to content

Commit

Permalink
[Infra] Re-use build extra env vars to enable no cache option
Browse files Browse the repository at this point in the history
  • Loading branch information
auphelia committed Oct 24, 2024
1 parent 14b68b7 commit 72dcb87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,15 @@ if [ -d "$FINN_XRT_PATH" ];then
fi

if [ "$FINN_DOCKER_NO_CACHE" = "1" ]; then
export NO_CACHE_STRING="--no-cache"
else
export NO_CACHE_STRING=""
FINN_DOCKER_BUILD_EXTRA+="--no-cache"
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 $NO_CACHE_STRING .
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 .
cd $OLD_PWD
fi

Expand Down

0 comments on commit 72dcb87

Please sign in to comment.