Skip to content

Commit

Permalink
Support no-cache option
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp committed Aug 26, 2024
1 parent 135b502 commit f8e9c76
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dev_container
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ Usage: ./dev_container build [options]
--docker_file : path to Dockerfile to use for building container.
--img : Specify fully qualified container name
--verbose : Print variables passed to docker build command
--no-cache : Do not use cache when building the image
'
}

Expand All @@ -496,6 +497,7 @@ build() {
local img=$(get_default_img)
local compute_capacity=$(get_compute_capacity)
local print_verbose=0
local no_cache=

# Check if buildx exists
if ! $(docker buildx version &>/dev/null); then
Expand Down Expand Up @@ -538,6 +540,10 @@ build() {
exit 1
fi
;;
--no-cache)
no_cache="--no-cache"
shift
;;
--verbose)
print_verbose=1
shift
Expand Down Expand Up @@ -566,6 +572,7 @@ build() {
--build-arg GPU_TYPE=${gpu_type} \
--build-arg COMPUTE_CAPACITY=${compute_capacity} \
--network=host \
${no_cache} \
-f ${docker_file_path} \
-t ${img} \
${HOLOHUB_ROOT}
Expand Down

0 comments on commit f8e9c76

Please sign in to comment.