@@ -137,32 +137,29 @@ if [[ $DEVICE == "tpu" ]]; then
137137 fi
138138fi
139139
140- # Save the script folder path of maxtext
141- run_name_folder_path=$( pwd)
142-
143- # Install dependencies from requirements.txt
144- cd " $run_name_folder_path " && python3 -m uv pip install --upgrade pip
145140if [[ " $MODE " == " nightly" ]]; then
146141 echo " Nightly mode: Installing requirements.txt, stripping commit pins from git+ repos."
147- cp requirements.txt requirements.txt.nightly-temp
142+
148143 # Create a temp file, strip commit pins from git+ repos in requirements.txt
149144 # Remove/update this section based on the pinned github repo commit in requirements.txt
150- sed -i -E \
151- -e ' s|^mlperf-logging @ https?://github.com/mlcommons/logging/archive/.*\.zip$|mlperf-logging@git+https://github.com/mlperf/logging.git|' \
145+ sed -E \
152146 -e ' s|^([^ ]*) @ https?://github.com/([^/]*\/[^/]*)/archive/.*\.zip$|\1@git+https://github.com/\2.git|' \
153- requirements.txt.nightly-temp
147+ -e ' /JetStream/d' \
148+ -e ' /mlperf-logging/d' \
149+ requirements.txt > requirements.txt.nightly-temp
154150
155151 echo " --- Installing modified nightly requirements: ---"
156152 cat requirements.txt.nightly-temp
157153 echo " -------------------------------------------------"
158154
159- python3 -m uv pip install --no-cache-dir -U -r requirements.txt.nightly-temp
155+ python3 -m uv pip install --no-cache-dir -U -r requirements.txt.nightly-temp \
156+ -r " ${MAXTEXT_REPO_ROOT?} " ' /extra_deps_from_github.txt'
160157 rm requirements.txt.nightly-temp
161158else
162159 # stable or stable_stack mode: Install with pinned commits
163160 echo " Installing tpu-requirements.txt with pinned commits."
164161 tpu_requirements_txt=
165- for candidate in ' generated_requirements' " ${MAXTEXT_REPO_ROOT} " ' /generated_requirements' " $PWD " ; do
162+ for candidate in ' generated_requirements' " ${MAXTEXT_REPO_ROOT? } " ' /generated_requirements' " $PWD " ; do
166163 if [ -f " $candidate " ' /tpu-requirements.txt' ]; then
167164 tpu_requirements_txt=" $candidate " ' /tpu-requirements.txt'
168165 break
174171 >&2 printf ' Could not find "tpu-requirements.txt", looked in: %s\n' " ${searched% ?} "
175172 exit 2
176173 else
177- python3 -m uv pip install --resolution=lowest -r " $tpu_requirements_txt "
174+ python3 -m uv pip install --resolution=lowest -r " $tpu_requirements_txt " \
175+ -r " ${MAXTEXT_REPO_ROOT?} " ' /extra_deps_from_github.txt'
178176 fi
179177fi
180178
0 commit comments