-
Notifications
You must be signed in to change notification settings - Fork 6
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
Build multi-arch image with amd64 + arm64 for M1 Macs #35
Comments
Benchmark with a larger workflow (n=262 sequences):
So, M1 mac users would benefit greatly from having this. |
@fanninpm I believe so, yes. Thanks for pointing that out. All our Python code should be compat with 3.9, but of course there will probably be some knock-on effects like new warnings, missing wheels for deps, etc. Hopefully those are minimal given that 3.9 is not the newest kid on the block anymore. |
I'll look at this after getting some other things off my plate, unless anyone else wants to start on it. |
Stumbled upon this relevant Reddit thread which suggests that even with a |
Yeah, it's always been the case on macOS that you pay for the cost of OS virt. The expectation (at least mine) with a |
It's worth noting that in addition to M1/M2 Macs, another interesting hardware platform that could use these ARM images is AWS Graviton. In fact it could well be one of the best platforms for automating the build, testing and publication of these images! |
@sacundim Graviton is interesting, though for CI here we'll likely stick to using GitHub Actions runners, even when producing That said, Graviton might be interesting for our production compute jobs on AWS Batch, but we'd have to do some serious benchmarking/tuning to compare! |
@victorlin It'd be good to benchmark docker vs native for an Intel mac, too, to see how much worse it is with apple silicon vs intel in the case of macOS. What's the workflow you ran? I could do the benchmark on my 2018 Intel MBP. |
@corneliusroemer in #35 (comment) I ran the ncov example data tutorial workflow. The reference data changes daily, but sample size should be similar enough for a rough comparison. |
@tsibley What I mean is that I played around a bit with using Whereas I also played with the following AWS Codebuild tutorial that builds the two platforms in native hardware and found it straightforward enough. Notably there's no servers to set up and maintain: Just my brief experience, of course. Another factor is that GitHub Actions is free... |
@sacundim Ah! Well, I guess we'll see how painfully slow it is and evaluate from there… I'm loathe to add another service like CodeBuild to the mix here, but it's good to know that's an option. |
I just ran our current hmpxv-1 on my new M1 Pro, once with conda (Intel emulation) and once with docker. Docker: 2hr Running the same workflow on apple silicon docker takes only ~16min. So I get the same factor of ~10 slowdown as @victorlin above - this time on a real production workflow. Definitely not usable as is with docker. |
Docker Desktop 4.25.0, released on 2023-10-26, includes emulation improvements:
With Rosetta, I suspect performance of the |
Images are currently
linux/amd64
, which means running on M1 Macs requires Intel emulation to work on thearm64
architecture. Emulation is documented to be poorly supported, though @victorlin has successfully run zika-tutorial using theamd64
image on an M1 Mac (but has not tried anything larger yet).We can use
docker buildx
instead ofdocker build
to produce multi-arch images (linux/amd64
+linux/arm64
) so that emulation isn't required.Reference material:
The text was updated successfully, but these errors were encountered: