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

Update jaxlib for evofr on linux/arm64 #171

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(non-blocking)

I did not realize this change was needed until I saw the "Validate Platform" job fail in the CI run³ that I triggered to update evofr to v0.1.20.

I'm glad CI caught this, but still, it probably would have taken me some time to figure out that updating jaxlib is the solution since I'm not familiar with evofr.

I can't think of a good way to accommodate future occurrences, barring official pre-built binaries for linux/arm64. Maybe a note alongside the evofr installation hinting at a pinned jaxlib would help? This also applies to Augur's CVXOPT dependency, which is now pinned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a note alongside the evofr installation hinting at a pinned jaxlib would help?

Good idea! I added a note for our future selves in the latest commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if there was an option for pip to warn us if it's unable to install the latest version because it's unable to satisfy dependency requirements. I found some discussions in pypa/pip#10784 for potentially adding a new feature for warning on mismatched Python version requirements. However, I can't seem to find an existing option to avoid this silent downgrade 😞

Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# 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 \
pip3 install https://github.com/yoziru/jax/releases/download/jaxlib-v0.4.6/jaxlib-0.4.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl \
; \
fi

Expand Down Expand Up @@ -354,6 +354,9 @@ RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/build
&& pip3 install --editable .

# Add evofr for forecasting
# NOTE: if there is an issue with the evofr installation on linux/arm64, make
# sure to check that the jaxlib installation above satisfies the latest evofr
# dependency requirements.
RUN pip3 install evofr

# ———————————————————————————————————————————————————————————————————— #
Expand Down