Skip to content

Commit a5eaaa9

Browse files
authored
Support no-cache option (#478)
Signed-off-by: Victor Chang <vicchang@nvidia.com>
1 parent cce6d37 commit a5eaaa9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dev_container

+7
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ Usage: ./dev_container build [options]
484484
--docker_file : path to Dockerfile to use for building container.
485485
--img : Specify fully qualified container name
486486
--verbose : Print variables passed to docker build command
487+
--no-cache : Do not use cache when building the image
487488
'
488489
}
489490

@@ -496,6 +497,7 @@ build() {
496497
local img=$(get_default_img)
497498
local compute_capacity=$(get_compute_capacity)
498499
local print_verbose=0
500+
local no_cache=
499501

500502
# Check if buildx exists
501503
if ! $(docker buildx version &>/dev/null); then
@@ -538,6 +540,10 @@ build() {
538540
exit 1
539541
fi
540542
;;
543+
--no-cache)
544+
no_cache="--no-cache"
545+
shift
546+
;;
541547
--verbose)
542548
print_verbose=1
543549
shift
@@ -566,6 +572,7 @@ build() {
566572
--build-arg GPU_TYPE=${gpu_type} \
567573
--build-arg COMPUTE_CAPACITY=${compute_capacity} \
568574
--network=host \
575+
${no_cache} \
569576
-f ${docker_file_path} \
570577
-t ${img} \
571578
${HOLOHUB_ROOT}

0 commit comments

Comments
 (0)