Skip to content

Commit 730cab3

Browse files
committed
Upgrade TPU VM to python 3.10
Currently removing some packages which fail to install. http://b/295050179
1 parent c9fd0b7 commit 730cab3

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

tpu/Dockerfile

+9-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ FROM $BASE_IMAGE
66
# See: https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
77
ARG PYTHON_WHEEL_VERSION
88
ARG PYTHON_VERSION_PATH
9-
ARG LINUX_WHEEL_VERSION
9+
ARG TF_LINUX_WHEEL_VERSION
10+
ARG TORCH_LINUX_WHEEL_VERSION
1011
ARG TORCH_VERSION
1112
ARG TENSORFLOW_VERSION
1213
ARG TF_LIBTPU_VERSION
@@ -52,12 +53,13 @@ ADD patches/kaggle_datasets.py /root/.local/lib/${PYTHON_VERSION_PATH}/site-pack
5253

5354
# Additional useful packages should be added here
5455

55-
RUN pip install tensorflow_hub https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/tensorflow/tf-${TENSORFLOW_VERSION}/tensorflow-${TENSORFLOW_VERSION}-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${LINUX_WHEEL_VERSION}.whl tensorflow-addons tensorflow-probability tensorflow-io \
56-
torch==${TORCH_VERSION} https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/torch_xla-${TORCH_VERSION%.*}-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${LINUX_WHEEL_VERSION}.whl torchvision==${TORCHVISION_VERSION} torchtext==${TORCHTEXT_VERSION} torchaudio==${TORCHAUDIO_VERSION} \
57-
jax[tpu]==${JAX_VERSION} -f https://storage.googleapis.com/jax-releases/libtpu_releases.html trax flax optax elegy git+https://github.com/deepmind/dm-haiku jraph distrax \
58-
numpy==1.23.5 \
59-
papermill jupyterlab python-lsp-server[all] "jupyter-lsp==1.5.1" \
60-
pandas matplotlib opencv-python-headless librosa scikit-learn accelerate diffusers transformers
56+
RUN pip install tensorflow_hub https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/tensorflow/tf-${TENSORFLOW_VERSION}/tensorflow-${TENSORFLOW_VERSION}-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${TF_LINUX_WHEEL_VERSION}.whl tensorflow-addons tensorflow-probability tensorflow-io \
57+
torch==${TORCH_VERSION} https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-${TORCH_VERSION}-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${TORCH_LINUX_WHEEL_VERSION}.whl torchvision==${TORCHVISION_VERSION} torchtext==${TORCHTEXT_VERSION} torchaudio==${TORCHAUDIO_VERSION} \
58+
jax[tpu]==${JAX_VERSION} -f https://storage.googleapis.com/jax-releases/libtpu_releases.html trax flax optax git+https://github.com/deepmind/dm-haiku jraph distrax \
59+
# numpy==1.23.5 \
60+
papermill jupyterlab python-lsp-server[all] "jupyter-lsp==1.5.1"
61+
# elegy
62+
# pandas matplotlib opencv-python-headless librosa accelerate diffusers scikit-learn transformers
6163

6264
# Tensorflow libtpu:
6365
RUN curl --output /lib/libtpu.so https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/libtpu/${TF_LIBTPU_VERSION}/libtpu.so

tpu/config.txt

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
BASE_IMAGE=python:3.8
2-
PYTHON_WHEEL_VERSION=cp38
3-
PYTHON_VERSION_PATH=python3.8
1+
BASE_IMAGE=python:3.10
2+
PYTHON_WHEEL_VERSION=cp310
3+
PYTHON_VERSION_PATH=python3.10
44
# https://cloud.google.com/tpu/docs/supported-tpu-configurations#tpu_software_versions:~:text=TensorFlow%20version-,libtpu.so%20version,-2.13.0
5-
TENSORFLOW_VERSION=2.12.0
6-
TF_LIBTPU_VERSION=1.6.0
7-
JAX_VERSION=0.4.13
5+
TENSORFLOW_VERSION=2.14.0
6+
TF_LIBTPU_VERSION=1.8.0
7+
TF_LINUX_WHEEL_VERSION=manylinux_2_17_x86_64.manylinux2014_x86_64
8+
JAX_VERSION=0.4.17
89
# Supports nightly
9-
TORCH_VERSION=2.0.0
10+
TORCH_VERSION=2.1.0
1011
# https://github.com/pytorch/audio supports nightly
11-
TORCHAUDIO_VERSION=2.0.0
12+
TORCHAUDIO_VERSION=2.1.0
1213
# https://github.com/pytorch/text supports main
13-
TORCHTEXT_VERSION=0.15.1
14+
TORCHTEXT_VERSION=0.16.0
1415
# https://github.com/pytorch/vision supports nightly
15-
TORCHVISION_VERSION=0.15.1
16-
LINUX_WHEEL_VERSION=linux_x86_64
16+
TORCHVISION_VERSION=0.16.0
17+
TORCH_LINUX_WHEEL_VERSION=manylinux_2_28_x86_64

0 commit comments

Comments
 (0)