Skip to content

Commit 73f6306

Browse files
Merge pull request #2358 from AI-Hypercomputer:rbierneni-add-pinned-github-commits
PiperOrigin-RevId: 807883660
2 parents 4ec4c72 + 4567d3c commit 73f6306

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

maxtext_jax_ai_image.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ RUN ls .
5555
ARG TEST_TYPE
5656
# Copy over test assets if building image for end-to-end tests or unit tests
5757
RUN if [ "$TEST_TYPE" = "xlml" ] || [ "$TEST_TYPE" = "unit_test" ]; then \
58-
if ! gcloud storage cp -r gs://maxtext-test-assets/* "${MAXTEXT_TEST_ASSETS_DIR}"; then \
58+
if ! gcloud storage cp -r gs://maxtext-test-assets/* "${MAXTEXT_TEST_ASSETS_ROOT}"; then \
5959
echo "WARNING: Failed to download test assets from GCS. These files are only used for end-to-end tests; you may not have access to the bucket."; \
6060
fi; \
6161
fi

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ aqtp
33
array-record
44
cloud-accelerator-diagnostics
55
cloud-tpu-diagnostics
6+
datasets
67
flax
78
gcsfs
89
google-api-python-client
910
google-cloud-aiplatform
1011
google-cloud-monitoring
1112
grain[parquet]
1213
huggingface_hub
13-
jax<0.7.1
14-
jaxlib<0.7.1
14+
jax!=0.7.1
15+
jaxlib!=0.7.1
1516
jaxtyping
1617
jsonlines
1718
ml-collections
@@ -39,5 +40,4 @@ transformers
3940
tunix @ https://github.com/google/tunix/archive/d770659621eb16ef6588268e26fa687fa068df20.zip
4041
google-jetstream @ https://github.com/AI-Hypercomputer/JetStream/archive/daedc21c393f23449fb54ddc4f75fca34348ea9c.zip
4142
mlperf-logging @ https://github.com/mlcommons/logging/archive/38ab22670527888c8eb7825a4ece176fcc36a95d.zip
42-
# datasets 0.4.0 is not compatible with fsspec==2025.7.0. It will be updated in the next datasets release.
43-
datasets @ https://github.com/huggingface/datasets/archive/6790e138c00b87a1ddc72184f89e7814cf784360.zip
43+
qwix @ https://github.com/google/qwix/archive/f2fd7b9114ff8d09e5b0131a453351578502da8a.zip

requirements_with_jax_ai_image.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Requirements for Building the MaxText Docker Image
22
# These requirements are additional to the dependencies present in the JAX AI base image.
3-
datasets
3+
datasets @ https://github.com/huggingface/datasets/archive/6790e138c00b87a1ddc72184f89e7814cf784360.zip
44
flax>=0.11.0
55
google-api-python-client
6-
google-jetstream@git+https://github.com/AI-Hypercomputer/JetStream.git
6+
google-jetstream @ https://github.com/AI-Hypercomputer/JetStream/archive/daedc21c393f23449fb54ddc4f75fca34348ea9c.zip
77
grain[parquet]>=0.2.12
88
jaxtyping
99
jsonlines
10-
mlperf-logging@git+https://github.com/mlperf/logging.git
10+
mlperf-logging @ https://github.com/mlcommons/logging/archive/38ab22670527888c8eb7825a4ece176fcc36a95d.zip
1111
omegaconf
1212
orbax-checkpoint>=0.11.22
1313
pathwaysutils>=0.1.1
@@ -23,4 +23,5 @@ tensorflow-datasets
2323
tensorflow-text>=2.17.0
2424
tiktoken
2525
transformers
26-
tunix@git+https://github.com/google/tunix.git
26+
tunix @ https://github.com/google/tunix/archive/d770659621eb16ef6588268e26fa687fa068df20.zip
27+
qwix @ https://github.com/google/qwix/archive/f2fd7b9114ff8d09e5b0131a453351578502da8a.zip

setup.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,27 @@ run_name_folder_path=$(pwd)
139139

140140
# Install dependencies from requirements.txt
141141
cd "$run_name_folder_path" && python3 -m uv pip install --upgrade pip
142-
python3 -m uv pip install --no-cache-dir -U -r requirements.txt
142+
if [[ "$MODE" == "nightly" ]]; then
143+
echo "Nightly mode: Installing requirements.txt, stripping commit pins from git+ repos."
144+
cp requirements.txt requirements.txt.nightly-temp
145+
# Create a temp file, strip commit pins from git+ repos in requirements.txt
146+
# Remove/update this section based on the pinned github repo commit in requirements.txt
147+
sed -i -E \
148+
-e 's|^mlperf-logging @ https?://github.com/mlcommons/logging/archive/.*\.zip$|mlperf-logging@git+https://github.com/mlperf/logging.git|' \
149+
-e 's|^([^ ]*) @ https?://github.com/([^/]*\/[^/]*)/archive/.*\.zip$|\1@git+https://github.com/\2.git|' \
150+
requirements.txt.nightly-temp
151+
152+
echo "--- Installing modified nightly requirements: ---"
153+
cat requirements.txt.nightly-temp
154+
echo "-------------------------------------------------"
155+
156+
python3 -m uv pip install --no-cache-dir -U -r requirements.txt.nightly-temp
157+
rm requirements.txt.nightly-temp
158+
else
159+
# stable or stable_stack mode: Install with pinned commits
160+
echo "Installing requirements.txt with pinned commits."
161+
python3 -m uv pip install --no-cache-dir -U -r requirements.txt
162+
fi
143163

144164
# Install maxtext package
145165
if [ -f 'pyproject.toml' ]; then

0 commit comments

Comments
 (0)