Skip to content

Commit

Permalink
Fix #8475: add libtpu-wheels registry when building docker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tengyifei committed Dec 10, 2024
1 parent 7b5aca6 commit 4000f99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion infra/ansible/roles/install_deps/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4000f99

Please sign in to comment.