From 4000f99964fec0447b135befa6c500a193ac0e7e Mon Sep 17 00:00:00 2001 From: Yifei Teng Date: Tue, 10 Dec 2024 00:06:10 +0000 Subject: [PATCH] Fix #8475: add libtpu-wheels registry when building docker When building docker images, we install `torch_xla[tpu]` on there. If the old registry is used, then pip will only find an old version of libtpu and will then resolve to an older version torch_xla (2.5.1). I went over the repo and made sure every `libtpu-releases` registry is followed by `libtpu-wheels`. Fixes #8475. --- CONTRIBUTING.md | 2 +- infra/ansible/roles/install_deps/tasks/main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d5ba68e077..fbfbdf2dbe3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -205,4 +205,4 @@ Then run `test/run_tests.sh` and `test/cpp/run_tests.sh` to verify the setup is ### Sharp Edges * If local changes aren't visible, uninstall existing pytorch/xla with `pip uninstall torch_xla` and `pip uninstall torch`, then rebuild PyTorch and PyTorch/XLA with `python setup.py develop` or `python setup.py install`. -* PJRT errors when running on TPU such as `The PJRT plugin has PJRT API version 0.34. The framework PJRT API version is 0.40`. You need to update your `libtpu.so` and ensure it's in your `LD_LIBRARY_PATH` environmental directory. You can download a new `libtpu.so` at [Google Cloud](https://storage.googleapis.com/libtpu-releases/index.html), which are sorted by date. Download the newest one and install it at `pip install libtpu...whl`. +* PJRT errors when running on TPU such as `The PJRT plugin has PJRT API version 0.34. The framework PJRT API version is 0.40`. You need to update your `libtpu.so` and ensure it's in your `LD_LIBRARY_PATH` environmental directory. You can download a new `libtpu.so` at [Google Cloud](https://storage.googleapis.com/libtpu-wheels/index.html), which are sorted by date. Download the newest one and install it at `pip install libtpu...whl`. diff --git a/infra/ansible/roles/install_deps/tasks/main.yaml b/infra/ansible/roles/install_deps/tasks/main.yaml index 9a49721a46b..7fb6fbca173 100644 --- a/infra/ansible/roles/install_deps/tasks/main.yaml +++ b/infra/ansible/roles/install_deps/tasks/main.yaml @@ -28,7 +28,7 @@ - name: Install pip packages ansible.builtin.pip: name: "{{ pip_pkgs }}" - extra_args: -f https://storage.googleapis.com/libtpu-releases/index.html + extra_args: -f https://storage.googleapis.com/libtpu-releases/index.html -f https://storage.googleapis.com/libtpu-wheels/index.html - name: Install pip packages without deps (--no-deps) ansible.builtin.pip: