Skip to content
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

Install jaxlib from a Nextstrain-managed repository #119

Closed
victorlin opened this issue Dec 16, 2022 · 5 comments · Fixed by #186
Closed

Install jaxlib from a Nextstrain-managed repository #119

victorlin opened this issue Dec 16, 2022 · 5 comments · Fixed by #186
Assignees
Labels
enhancement New feature or request

Comments

@victorlin
Copy link
Member

Originally from #50 (comment)

On the linux/arm64 platform, jaxlib is installed from a pre-built binary provided by an external GitHub user:

docker-base/Dockerfile

Lines 172 to 179 in 960fb5b

# Install jaxlib on linux/arm64
# jaxlib, an evofr dependency, does not have official pre-built binaries for
# linux/arm64. A GitHub user has provided them in a fork repo.
# https://github.com/google/jax/issues/7097#issuecomment-1110730040
RUN if [[ "$TARGETPLATFORM" == linux/arm64 ]]; then \
pip3 install https://github.com/yoziru/jax/releases/download/jaxlib-v0.3.25/jaxlib-0.3.25-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl \
; \
fi

We should look into building and repackaging this library ourselves for security and reliability reasons.

@victorlin
Copy link
Member Author

An example of how the unofficial binary is not reliable: #173 (comment)

@victorlin
Copy link
Member Author

I'm looking into building JAX locally.

@victorlin victorlin self-assigned this Jul 18, 2023
@tsibley tsibley mentioned this issue Jul 18, 2023
1 task
@victorlin
Copy link
Member Author

victorlin commented Jul 24, 2023

I have an unfinished attempt at victorlin/build-jax. Summarizing the progress here since I plan to focus on other things for now.

The goal was to try to compile an AARCH64 version of JAX on a GitHub-hosted Linux runner (AMD64).

I briefly tried building via Docker under emulation, which was unsuccessful. Even if it were successful, it would probably take longer than the maximum allowed GitHub Actions workflow run time.

Then, I focused on cross-compiling since that has been done before. I attempted this first with then without Docker (for easier debugging of individual commands as GitHub Actions steps). With a 3.5 hour run time, I was able to build a file jaxlib-0.4.9-cp310-cp310-manylinux2014_aarch64.whl (a downloadable artifact of the linked run). However, I'm not sure that this wheel works because auditwheel repair failed on the file. I think the failure makes sense because I didn't use a manylinux Docker image. To address that, I tried building with messense/manylinux2014-cross:x86_64 but had troubles running the setup commands before the actual JAX build.

@victorlin
Copy link
Member Author

victorlin commented Jul 27, 2023

I just noticed that conda-forge includes an AARCH64 version of jaxlib (feedstock). It's not maintained by JAX developers, but at least looks more reliable than the status quo.

We might not want to use it directly due to reasons described in #127 (comment), but it's one example that would benefit from using Conda in the image build.

@victorlin
Copy link
Member Author

This is no longer necessary now that jaxlib version 0.4.18 includes Linux aarch64 wheels. I've pushed 85fe9a7 to try things out and will make a PR if it goes well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant