Skip to content

Commit 0f422b7

Browse files
authored
Merge pull request #1193 from Kaggle/tpu-tf-offline
add deps for tf for installing offline
2 parents 3ed70bb + 6d08572 commit 0f422b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tpu/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ ADD patches/template_conf.json /opt/kaggle/conf.json
1313
# Tensorflow wheel:
1414
# When tensorflow is compatible with being installed alongside JAX/Pytorch then we no longer need to include the wheel and can install it directly.
1515
# RUN pip install https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/tensorflow/tf-${TENSORFLOW_VERSION}/tensorflow-${TENSORFLOW_VERSION}-cp38-cp38-linux_x86_64.whl
16+
# To install offline:
17+
# pip install --no-index --find-links /lib/wheels/sources /lib/wheels/tensorflow-2.9.1-cp38-cp38-linux_x86_64.whl
1618
RUN mkdir -p /lib/wheels && curl --output /lib/wheels/tensorflow-${TENSORFLOW_VERSION}-cp38-cp38-linux_x86_64.whl https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/tensorflow/tf-${TENSORFLOW_VERSION}/tensorflow-${TENSORFLOW_VERSION}-cp38-cp38-linux_x86_64.whl
1719
RUN curl --output /lib/libtpu.so https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/libtpu/1.3.0/libtpu.so
20+
RUN pip download -d /lib/wheels/sources /lib/wheels/tensorflow-${TENSORFLOW_VERSION}-cp38-cp38-linux_x86_64.whl
1821

1922
# LIBTPU installed here:
2023
ENV PIP_LIBTPU=/usr/local/lib/python3.8/site-packages/libtpu/libtpu.so

0 commit comments

Comments
 (0)