Skip to content

Commit 5545f99

Browse files
authored
TPU upgrades to tf and torch, clean up dead code (#1480)
Since the latest colab image is now python 3.11, we should try to bump this as well. Also removing comments and code that are out of date
1 parent b0f0125 commit 5545f99

File tree

3 files changed

+5
-28
lines changed

3 files changed

+5
-28
lines changed

tpu/Dockerfile

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,13 @@ ADD patches/kaggle_session.py /root/.local/lib/${PYTHON_VERSION_PATH}/site-packa
2525
ADD patches/kaggle_web_client.py /root/.local/lib/${PYTHON_VERSION_PATH}/site-packages/kaggle_web_client.py
2626
ADD patches/kaggle_datasets.py /root/.local/lib/${PYTHON_VERSION_PATH}/site-packages/kaggle_datasets.py
2727

28-
# Disable GCP integrations for now
29-
# ADD patches/kaggle_gcp.py /root/.local/lib/${PYTHON_VERSION_PATH}/site-packages/kaggle_gcp.py
30-
31-
# Disable logging to file (why do we need this?)
32-
# ADD patches/log.py /root/.local/lib/${PYTHON_VERSION_PATH}/site-packages/log.py
33-
34-
# sitecustomize adds significant latency to ipython kernel startup and should only be added if needed
35-
# ADD patches/sitecustomize.py /root/.local/lib/${PYTHON_VERSION_PATH}/site-packages/sitecustomize.py
36-
3728
# Prereqs
3829
# This is needed for cv2 (opencv-python):
3930
# https://stackoverflow.com/questions/55313610/importerror-libgl-so-1-cannot-open-shared-object-file-no-such-file-or-directo
4031
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
4132

4233
# Install all the packages together for maximum compatibility.
43-
44-
# Install Tensorflow.
45-
46-
# Install Pytorch & related packages
47-
# https://cloud.google.com/tpu/docs/pytorch-xla-ug-tpu-vm#changing_pytorch_version
48-
# The URL doesn't include patch version. i.e. must use 1.11 instead of 1.11.0
49-
# We need to keep the numpy version the same as the installed tf one but compatible with other installs.
50-
51-
# Install JAX & related packages
52-
# https://cloud.google.com/tpu/docs/jax-quickstart-tpu-vm#install_jax_on_your_cloud_tpu_vm
53-
54-
# Packages needed by the Notebook editor
55-
5634
# Additional useful packages should be added in the requirements.txt
57-
5835
# Bring in the requirements.txt and replace variables in it:
5936
RUN apt-get install -y gettext
6037
ADD tpu/requirements.txt /kaggle_requirements.txt

tpu/config.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ PYTHON_VERSION_PATH=python3.10
44
TENSORFLOW_VERSION=2.18.0
55
# gsutil ls gs://pytorch-xla-releases/wheels/tpuvm/* | grep libtpu | grep torch_xla | grep -v -E ".*rc[0-9].*" | sed 's/.*torch_xla-\(.*\)+libtpu.*/\1/' | sort -rV
66
# Supports nightly
7-
TORCH_VERSION=2.5.0
7+
TORCH_VERSION=2.6.0
88
# https://github.com/pytorch/audio supports nightly
9-
TORCHAUDIO_VERSION=2.5.0
9+
TORCHAUDIO_VERSION=2.6.0
1010
# https://github.com/pytorch/vision supports nightly
11-
TORCHVISION_VERSION=0.20.0
11+
TORCHVISION_VERSION=0.21.0
1212
TORCH_LINUX_WHEEL_VERSION=manylinux_2_28_x86_64

tpu/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# TPU Utils
22
tpu-info
33
# Tensorflow packages
4-
tensorflow-tpu>=${TENSORFLOW_VERSION}
4+
tensorflow-tpu==${TENSORFLOW_VERSION}
55
--find-links https://storage.googleapis.com/libtpu-tf-releases/index.html
66
tensorflow_hub
77
tensorflow-io
88
tensorflow-probability
99
# Torch packages
10-
torch~=${TORCH_VERSION}
10+
torch==${TORCH_VERSION}
1111
https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-${TORCH_VERSION}+libtpu-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${TORCH_LINUX_WHEEL_VERSION}.whl
1212
torchaudio==${TORCHAUDIO_VERSION}
1313
torchvision==${TORCHVISION_VERSION}

0 commit comments

Comments
 (0)