File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 33# This script builds Docker containers for tutorials.
44#
55# Usage:
6- # ./dev-build.bash <tutorial-name>
6+ # ./dev-build.bash [--no-cache] [ <tutorial-name>]
77#
88# If a tutorial name is provided (e.g., "accelerated-python"), only that tutorial is built.
99# If no argument is provided, all tutorials are built.
10+ #
11+ # Options:
12+ # --no-cache Rebuild the image from scratch, ignoring the Docker layer cache.
1013
1114set -eu
1215
16+ NO_CACHE=" "
17+ while [[ $# -gt 0 ]]; do
18+ case ${1} in
19+ --no-cache)
20+ NO_CACHE=" --no-cache"
21+ shift
22+ ;;
23+ * )
24+ break
25+ ;;
26+ esac
27+ done
28+
1329SCRIPT_PATH=$( cd $( dirname ${0} ) ; pwd -P)
1430REPO_ROOT=$( cd ${SCRIPT_PATH} /..; pwd -P)
1531
@@ -39,7 +55,7 @@ build_tutorial() {
3955 echo " Dockerfile generated successfully"
4056 fi
4157
42- docker compose --progress=plain -f " ${ACH_TUTORIAL_PATH} /brev/docker-compose.yml" build
58+ docker compose --progress=plain -f " ${ACH_TUTORIAL_PATH} /brev/docker-compose.yml" build ${NO_CACHE}
4359
4460 echo " Successfully built image for ${ACH_TUTORIAL} "
4561 echo " "
You can’t perform that action at this time.
0 commit comments