180180if [[ " $MODE " == " stable" || ! -v MODE ]]; then
181181# Stable mode
182182 if [[ $DEVICE == " tpu" ]]; then
183+
184+
185+ # TODO: Once tunix has support for GPUs, move it from here to requirements.txt
186+ echo " Installing google-tunix for stable TPU environment"
187+ python3 -m uv pip install ' google-tunix>=0.1.0'
183188 echo " Installing stable jax, jaxlib for tpu"
184189 if [[ -n " $JAX_VERSION " ]]; then
185190 echo " Installing stable jax, jaxlib, libtpu version ${JAX_VERSION} "
186- python3 -m uv pip install jax[tpu]==${JAX_VERSION} -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
191+ python3 -m uv pip install -U jax[tpu]==${JAX_VERSION} -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
187192 else
188193 echo " Installing stable jax, jaxlib, libtpu for tpu"
189- python3 -m uv pip install ' jax[tpu]>0.4' -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
194+ python3 -m uv pip install -U ' jax[tpu]>0.4' -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
190195 fi
191-
192- # TODO: Once tunix has support for GPUs, move it from here to requirements.txt
193- echo " Installing google-tunix for stable TPU environment"
194- python3 -m uv pip install ' google-tunix>=0.1.0'
195-
196196 if [[ -n " $LIBTPU_GCS_PATH " ]]; then
197197 # Install custom libtpu
198198 echo " Installing libtpu.so from $LIBTPU_GCS_PATH to $libtpu_path "
@@ -232,12 +232,15 @@ elif [[ $MODE == "nightly" ]]; then
232232 export NVTE_FRAMEWORK=jax
233233 python3 -m uv pip install https://github.com/NVIDIA/TransformerEngine/archive/9d031f.zip
234234 elif [[ $DEVICE == " tpu" ]]; then
235+ echo " Installing nightly tensorboard plugin profile"
236+ python3 -m uv pip install tbp-nightly --upgrade
237+ # Installing tunix
238+ python3 -m uv pip install ' git+https://github.com/google/tunix.git'
235239 echo " Installing jax-nightly, jaxlib-nightly"
236240 # Install jax-nightly
237241 python3 -m uv pip install --pre -U jax -i https://us-python.pkg.dev/ml-oss-artifacts-published/jax/simple/
238242 # Install jaxlib-nightly
239243 python3 -m uv pip install --pre -U jaxlib -i https://us-python.pkg.dev/ml-oss-artifacts-published/jax/simple/
240-
241244 if [[ -n " $LIBTPU_GCS_PATH " ]]; then
242245 # Install custom libtpu
243246 echo " Installing libtpu.so from $LIBTPU_GCS_PATH to $libtpu_path "
@@ -250,10 +253,6 @@ elif [[ $MODE == "nightly" ]]; then
250253 echo " Installing libtpu-nightly"
251254 python3 -m uv pip install -U --pre libtpu -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
252255 fi
253- echo " Installing nightly tensorboard plugin profile"
254- python3 -m uv pip install tbp-nightly --upgrade
255- # Installing tunix
256- python3 -m uv pip install ' git+https://github.com/google/tunix.git'
257256 fi
258257 echo " Installing nightly tensorboard plugin profile"
259258 python3 -m uv pip install tbp-nightly --upgrade
0 commit comments