Skip to content

Add --no-cache flag to build_dockers and build_base_dockers#343

Open
mminutoli wants to merge 2 commits intomasterfrom
add_no_cache_option_docker_build
Open

Add --no-cache flag to build_dockers and build_base_dockers#343
mminutoli wants to merge 2 commits intomasterfrom
add_no_cache_option_docker_build

Conversation

@mminutoli
Copy link
Contributor

Motivation

Allow developers to force a clean Docker build without relying on the local layer cache, which may go stale on long-lived machines. When --no-cache is passed to build_base_dockers, the base image is rebuilt from scratch with --no-cache and --pull. When passed to build_dockers, the base image is unconditionally rebuilt and the jax image build receives --cache-from pointing at the freshly-built base so that Docker can still reuse its layers.

Also fix a pre-existing bug where add_llvm flags would clobber extra_args instead of extending them, and reformat with black.

Technical Details

When passing --no-cache to ci_build, the build passes --no-cache and --pull to the docker command building the base container. This will ensure that both the container and the base image (ubuntu 24.04) get updated.

Test Plan

Verify that containers get built without using the cache when --no-cache is passed.

Test Result

Passed.

Submission Checklist

Allow developers to force a clean Docker build without relying on
the local layer cache, which may go stale on long-lived machines.
When --no-cache is passed to build_base_dockers, the base image is
rebuilt from scratch with --no-cache and --pull.  When passed to
build_dockers, the base image is unconditionally rebuilt and the
jax image build receives --cache-from pointing at the freshly-built
base so that Docker can still reuse its layers.

Also fix a pre-existing bug where add_llvm flags would clobber
extra_args instead of extending them, and reformat with black.
@mminutoli mminutoli requested a review from gulsumgudukbay March 6, 2026 01:42
Add ArgumentDefaultsHelpFormatter to the main parser and all
subparsers so that --help displays default values for every option.
@mminutoli mminutoli requested a review from gulsumgudukbay March 6, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants