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

Check if Rosetta 2 is enabled in the Conda and Docker runner checks #361

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Feb 2, 2024

When on macOS on aarch64 hardware, the Conda runtime currently requires Rosetta. The Docker runtime does not require it, but can benefit from it because our aarch64 image isn't totally free of x86_64 code (yet?), so emulation is required and Rosetta is faster than QEMU.

The standalone installer still checks for Rosetta as we previously didn't produce aarch64 standalone binaries¹, but that check will be made conditional on Nextstrain CLI version in a subsequent commit² after the first release of aarch64 support and these new Rosetta checks.

¹ #357
² #358

Checklist

  • Checks pass

@tsibley tsibley requested a review from a team February 2, 2024 22:52
When on macOS on aarch64 hardware, the Conda runtime currently requires
Rosetta.  The Docker runtime does not require it, but can benefit from it
because our aarch64 image isn't totally free of x86_64 code (yet?),
so emulation is required and Rosetta is faster than QEMU.

The standalone installer still checks for Rosetta as we previously
didn't produce aarch64 standalone binaries¹, but that check will be made
conditional on Nextstrain CLI version in a subsequent commit² after the
first release of aarch64 support and these new Rosetta checks.

¹ <#357>
² <#358>
tsibley added a commit that referenced this pull request Feb 2, 2024
Conditions on the Nextstrain CLI version being requested, as aarch64
builds¹ will only be available going forward for new releases.  Assumes
the next release will be 8.2.0!

Disables Rosetta check when using an aarch64 build, as the checks will
be done at the runtime-level instead by `nextstrain setup` and
`nextstrain check-setup`.²

We must wait to merge this until after the first release (i.e. 8.2.0) of
the changes it depends on above.

¹ <#357>
² <#361>
@tsibley tsibley force-pushed the trs/rosetta-checks branch from 3fd478f to 8856915 Compare February 2, 2024 22:54
tsibley added a commit to nextstrain/docs.nextstrain.org that referenced this pull request Feb 2, 2024
… 8.2.0

Only the Conda runtime requires it.

Related-to: <nextstrain/cli#357>
Related-to: <nextstrain/cli#361>
Related-to: <nextstrain/cli#358>
@tsibley
Copy link
Member Author

tsibley commented Feb 6, 2024

I've tested this on the Blab Mac mini running macOS 12 on aarch64. It works as expected there. Going to merge, but I'd welcome post-merge review!

@tsibley tsibley merged commit 25075fa into master Feb 6, 2024
39 checks passed
@tsibley tsibley deleted the trs/rosetta-checks branch February 6, 2024 18:21
Copy link
Member

@victorlin victorlin left a comment

Choose a reason for hiding this comment

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

  • Tested using local git installation
$ nextstrain check-setup
nextstrain-cli is up to date!

Testing your setup…

# docker is supported
✔ yes: docker is installed
✔ yes: docker run works
✔ yes: containers have access to >2 GiB of memory (limit is 7.8 GiB)
✔ yes: image is new enough for this CLI version
✔ yes: Rosetta 2 is enabled for faster execution (optional)

# conda is supported
✔ yes: operating system is supported
✔ yes: Rosetta 2 is enabled
✔ yes: runtime data dir doesn't have spaces
✔ yes: runtime appears set up
✔ yes: snakemake is installed and runnable
✔ yes: augur is installed and runnable
✔ yes: auspice is installed and runnable

nextstrain/cli/runner/docker.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants