Skip to content

Commit ffa7d0d

Browse files
committed
fixing tf 2.18 install
1 parent 55c1821 commit ffa7d0d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

tpu/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ 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 TENSORFLOW_VERSION
910
ARG TORCH_LINUX_WHEEL_VERSION
1011
ARG TORCH_VERSION
1112
ARG TORCHVISION_VERSION
@@ -61,9 +62,9 @@ RUN envsubst < /kaggle_requirements.txt > /requirements.txt
6162

6263
# Install uv and then install the requirements:
6364
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
64-
RUN export PATH="${HOME}/.local/bin:${PATH}" && uv pip install --system -r /requirements.txt --prerelease=allow --find-links https://storage.googleapis.com/jax-releases/libtpu_releases.html && \
65+
RUN export PATH="${HOME}/.local/bin:${PATH}" && uv pip install --system -r /requirements.txt --prerelease=allow --force-reinstall && \
6566
/tmp/clean-layer.sh
66-
ENV PATH="${HOME}/.local/bin:${PATH}"
67+
ENV PATH="~/.local/bin:${PATH}"
6768

6869
# Kaggle Model Hub patches:
6970
ADD patches/kaggle_module_resolver.py /usr/local/lib/${PYTHON_VERSION_PATH}/site-packages/tensorflow_hub/kaggle_module_resolver.py

tpu/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BASE_IMAGE=python:3.10
22
PYTHON_WHEEL_VERSION=cp310
33
PYTHON_VERSION_PATH=python3.10
4-
TF_LINUX_WHEEL_VERSION=manylinux_2_17_x86_64.manylinux2014_x86_64
4+
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
77
TORCH_VERSION=2.5.0

tpu/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# TPU Utils
22
tpu-info
33
# Tensorflow packages
4-
tensorflow-tpu>=2.18.0
5-
-f https://storage.googleapis.com/libtpu-tf-releases/index.html
4+
tensorflow-tpu>=${TENSORFLOW_VERSION}
5+
--find-links https://storage.googleapis.com/libtpu-tf-releases/index.html
66
tensorflow_hub
77
tensorflow-io
88
tensorflow-probability
@@ -13,6 +13,7 @@ torchaudio==${TORCHAUDIO_VERSION}
1313
torchvision==${TORCHVISION_VERSION}
1414
# Jax packages
1515
jax[tpu]>=0.4.34
16+
--find-links https://storage.googleapis.com/jax-releases/libtpu_releases.html
1617
distrax
1718
flax
1819
git+https://github.com/deepmind/dm-haiku

0 commit comments

Comments
 (0)