-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing JAX with gpu/tpu support using poetry #5516
Comments
Poetry only supports PyPI and PEP 503 simple API repositories (nexus, gitlab packages, artifactory etc). An example similar to jax is pytorch. The latter recently started providing a PEP 503 repository making things easier. Note that this still has annoyances see #4231 (comment). Supporting "find-links" style sources is something that will probably happen in the future. However, note that poetry will have to download all files listed to fetch hashes and inspect metadata. All that said, in the mean time you provide url dependencies pointing to the wheels you want. Ideally with platform markers? Hope this helps. |
Can you please try the fix at #5517? Using pipxpipx install --suffix=@5517 'poetry @ git+https://github.com/python-poetry/poetry.git@refs/pull/5517/head' Using a container (podman | docker)podman run --rm -i --entrypoint bash docker.io/python:3.10 <<EOF
set -xe
python -m pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/5517/head
poetry new foobar
pushd foobar
poetry source add jax https://storage.googleapis.com/jax-releases/jax_releases.html
poetry add -vvv --lock --source jax jaxlib
cat poetry.lock
EOF |
Thank you for writing that ! I'm not sure how pipx works. If I run this command without a container, what would happen to my installed version of |
The |
here is the
and
|
Thanks for testing it out @pablo2909; looks like the change is working as intended; the local version selection is another issue (there is an open issue #4729). |
Nice, thank you for your help. Looking forward for this feature to be merged ! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue
Hi everyone,
I am installing JAX using poetry. I run the command
poetry add jax
and it works fine but this installs the cpu version, as expected. To install the gpu/tpu version of JAX the documentation indicates that I have to run:pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_releases.html
pip install "jax[tpu]>=0.2.16" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
I understand I could run this specific command in my environment, but if I do this, I believe, it is not handled well by poetry. Is there a more
poetry
way of installing JAX for gpu/tpu ?Thank you for the help :)
The text was updated successfully, but these errors were encountered: