Skip to content

Commit 98ebd1a

Browse files
committed
add layer cleaning, drop uninstall pytorch which is not installe
1 parent 1e337de commit 98ebd1a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tpu/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ COPY --from=libtpu /libtpu.so /lib
1212

1313
COPY --from=tensorflow_whl /tmp/tensorflow_pkg/tensorflow*.whl /tmp/tensorflow_pkg/
1414
RUN pip install /tmp/tensorflow_pkg/tensorflow*.whl && \
15-
rm -rf /tmp/tensorflow_pkg
15+
rm -rf /tmp/tensorflow_pkg && \
16+
/tmp/clean-layer.sh
1617

1718
# https://cloud.google.com/tpu/docs/pytorch-xla-ug-tpu-vm#changing_pytorch_version
18-
RUN pip uninstall -y torch
19-
RUN pip uninstall -y torch_xla
20-
RUN pip install torch==1.10
21-
RUN pip install torch_xla[tpuvm] -f https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/torch_xla-1.10-cp37-cp37m-linux_x86_64.whl
19+
RUN pip uninstall -y torch && \
20+
pip install torch==1.10 && \
21+
pip install torch_xla[tpuvm] -f https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/torch_xla-1.10-cp37-cp37m-linux_x86_64.whl && \
22+
/tmp/clean-layer.sh
2223

2324
# https://cloud.google.com/tpu/docs/jax-quickstart-tpu-vm#install_jax_on_your_cloud_tpu_vm
24-
RUN pip install "jax[tpu]>=0.2.16" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
25+
RUN pip install "jax[tpu]>=0.2.16" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html && \
26+
/tmp/clean-layer.sh

0 commit comments

Comments
 (0)