Skip to content

Support no-cache option in dev_container script #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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