Make Docker build and upload scripts runnable through pip#3359
Merged
copybara-service[bot] merged 1 commit intomainfrom Mar 11, 2026
Merged
Make Docker build and upload scripts runnable through pip#3359copybara-service[bot] merged 1 commit intomainfrom
copybara-service[bot] merged 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
d15b54b to
219cfc2
Compare
219cfc2 to
4adb621
Compare
dipannita08
approved these changes
Mar 11, 2026
4adb621 to
9fa9e9c
Compare
9fa9e9c to
6ad79a9
Compare
bvandermoon
added a commit
that referenced
this pull request
Mar 11, 2026
Imported from GitHub PR #3359 # Description * Move the `/dependencies` directory to `src/dependencies`. This allows the docker build/upload scripts to be included in the pip package * Create Python wrappers over `docker_build_dependency_image.sh` and `docker_upload_runner.sh` * Create new scripts in `pyproject.toml` for these Python wrappers. This lets users run these scripts directly after pip installing MaxText Next steps: * Add new installation option to `pyproject.toml` so users can run these scripts without installing unecessary dependencies * Update tutorials/docs that pip install maxtext to use the new script * We should probably convert the shell scripts to Python scripts to get rid of the Python wrappers in the long-term. This is lower priority right now Note: This changes the location the script is run from. We will update existing references we find and notify as many users as we can FIXES: b/490520594 # Tests Setup with `uv pip install -e .[tpu] --resolution=lowest` Built stable image through pip script + bash: ``` docker_build_dependency_image bash src/dependencies/scripts/docker_build_dependency_image.sh ``` Built nightly image: ``` docker_build_dependency_image MODE=nightly ``` Ran successful workload for both builds with: ``` python3 -m benchmarks.benchmark_runner xpk \ --project=$PROJECT \ --zone=$ZONE \ --device_type=v6e-256 \ --num_slices=1 \ --cluster_name=${CLUSTER_NAME} \ --base_output_directory=${OUTPUT_DIR} \ --model_name="llama3_1_70b_8192" \ --base_docker_image=maxtext_base_image \ --priority=high ``` ``` docker_upload_runner CLOUD_IMAGE_NAME=<cloud_image_name> ``` # Checklist Before submitting this PR, please make sure (put X in square brackets): - [x] I have performed a self-review of my code. For an optional AI review, add the `gemini-review` label. - [x] I have necessary comments in my code, particularly in hard-to-understand areas. - [x] I have run end-to-end tests tests and provided workload links above if applicable. - [x] I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in [our documentation](https://maxtext.readthedocs.io/en/latest/development.html#adding-new-documentation-files). Copybara import of the project: -- 6ad79a9 by Branden Vandermoon <bvandermoon@google.com>: Make Docker build and upload scripts runnable through pip Merging this change closes #3359 FUTURE_COPYBARA_INTEGRATE_REVIEW=#3359 from AI-Hypercomputer:bvandermoon-docker-builds 6ad79a9 PiperOrigin-RevId: 882116463
4 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
/dependenciesdirectory tosrc/dependencies. This allows the docker build/upload scripts to be included in the pip packagedocker_build_dependency_image.shanddocker_upload_runner.shpyproject.tomlfor these Python wrappers. This lets users run these scripts directly after pip installing MaxTextNext steps:
pyproject.tomlso users can run these scripts without installing unecessary dependenciesNote: This changes the location the script is run from. We will update existing references we find and notify as many users as we can
FIXES: b/490520594
Tests
Setup with
uv pip install -e .[tpu] --resolution=lowestBuilt stable image through pip script + bash:
Built nightly image:
Ran successful workload for both builds with:
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.