-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: add initial support for arm builds #40550
Conversation
Wow! Greate step! We will join and work together to make it happen! Also cc @martin-g |
I found some issue to make this PR green.
BTW, CIRCLE CI failed on osx-arm64 due to |
Upgrade miniconda version to py37_4.9.2 in bioconda-common bioconda/bioconda-common#34 Frankly, I'm not sure should we also upgrade to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I test it locally in Linux aarch64 with latest bioconda-utils, it works! And the config.yaml
should fix for latest bioconda-utils.
FYI, @johanneskoester this also what we should be ready before we support aarch64: bioconda/bioconda-containers#55 |
.circleci/config.yml
Outdated
resource_class: macos.m1.large.gen1 | ||
linux-aarch64: | ||
machine: | ||
image: ubuntu-2004:current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be useful:
Since recently it is possible to use Docker executor with ARM64 resources - https://circleci.com/docs/using-docker/#arm
This way you could use a custom Docker image that has most of the dependencies preinstalled. It will save a lot of time for the runs/builds!
Here is a small example:
- https://github.com/martin-g/circleci-arm64-test/blob/master/.circleci/config.yml#L17-L20
- https://app.circleci.com/pipelines/github/martin-g/circleci-arm64-test
Here I useopenEuler
Linux. CircleCI provides only Ubuntu images for themachine
executor. You could use CentOS (or even better - RockyLinux) as the other base images.
Hi all! Just wanted to pop my head up and say that we (@seqeralabs and @nextflow-io / @nf-core communities) would love to help out getting ARM bioconda builds rolling. I'm seeing a few semi-private efforts starting to nudge forward (eg. Oxford Nanopore, some Seqera proof-of-concept testing) and I'm a bit anxious that without bioconda to unite behind, we will start to see some fragmentation & duplication of efforts. Is there anything that we can do to move the bioconda infrastructure piece forward? I feel like we're coming to a place where we might be able to rally a fair amount of resources for this project, so if there's anywhere where that's needed then please say 🙏🏻 Once the bioconda back-end is in place, we could also try to help out with any community efforts to crowdsource arm recipe work via hackathons / events. That could be fun :) |
@ewels Thank you for offering your help here! You might be interested in the progress so far. Please check:
It would be great if you have time to test the proposed changes and either propose improvements or approve/vote for them! |
@ewels Great to hear about that! BTW, we also have completed about 500+ bioconda (bioconductor & conda) packages validation based on latest bioconda-utils[1][2][3]. It really turns out that bioconda on ARM is possible. We really need suggestion from Bioconda team about how we could move it forward in upstream. [1] bioconda/bioconda-utils#866 |
Wow, lots of discussions going on all over the place - more than I realised. Thanks both! And impressive work @Yikun! It seems to me that although there is still some work to do / some PRs to be merged to support this on the back-end, most things are about ready. Scanning over this, and chatting to @rpetit3, it sounds like the main thing missing is the CI infrastructure to run the automated builds. Is that approximately correct? @dpryan79, over in this comment you mentioned discussions with AWS about credits. Is anyone in @bioconda/core aware of progress on this front, or more generally aware of the current state of discussions around build infrastructure + funding for ARM packages? It's possible that I might be in a position to help to un-stick some of this, depending on what's needed. Happy to help out if I can be of any use. |
Hi @ewels. Indeed we have to offering to get AWS credits already, and that is still an option. This PR was on hold because I was reaching out to CircleCI whether it is possible to get a free M1 plan from them. We would prefer that because it would mean real and safe CI integration instead of having to manually set up something via AWS (which could as far as I am informed always lead to CI going mad and eating up all our credits, or even beyond). Unfortunately CircleCI did not answer me so far. However, if I am not wrong, at least the non-macos stuff is free to use for us already. So we could get started with that, and then, with Sequera behind us, we might be able to finally get an answer from CircleCI on the M1 question? |
Sounds great! Yes AWS credits are always a little scary and do need keeping an eye on. We've been using them heavily for @nf_core stuff for several years now and it's been (mostly) smooth sailing. Just need billing alerts and a handful of people to share responsibility for regularly checking remaining credits. I've been looking into methods to better automate some of this - eg. automated slack messages with remaining credit levels. Nothing to report yet, but there may be some hope yet.
Perfect - I'll see if I can get anything moving in CircleCI circles and in the mean time let's crack on! 🎉 |
Ok, seems to work!
|
@johanneskoester I can start working on item 1 (artifacts from CircleCI). |
Thanks a lot @aliciaaevans, and welcome to the team! |
- Support for downloading artifacts from CircleCI instead of Azure. - Added option `--artifact-source` with `choices=['azure', 'circleci']` to `handle_merged_pr` - Check architecture when returning platform - See PR for the ARM builds bioconda/bioconda-recipes#40550
bioconda/bioconda-utils#923 I drafted an initial PR for this task, feel free to review! Thanks |
For branches where there's no Any thoughts on if that is worth pursuing? |
I think it is a good optimization! |
$ grep -A 2 "additional-platforms:" recipes/abra2/meta.yaml
additional-platforms:
- linux-aarch64
$ grep -A 2 "additional-platforms:" recipes/abra2/meta.yaml | grep -q linux-aarch64
$ echo $?
0
$ grep -A 2 "additional-platforms:" recipes/abra2/meta.yaml | grep -q linux-x86
$ echo $?
1 A simple way without bioconda-utils install came to my mind might like above, even though it's not a perfect way, seems a possible alternative workaround. |
…nal-platforms (#923) This patches add support in bioconda-utils to run on linux-arm if the following is added to the recipe: ```yaml extra: additional-platforms: - linux-aarch64 ``` - Add a `check_native_platform_skippable` to checkout should we skip the recipes in current nativei platform - Add `extra_additional_platforms` property to recipe object - Add UT to test above function ``` py.test --durations=0 test/test_utils.py::test_native_platform_skipping py.test --durations=0 test/test_recipe.py::test_recipe_extra_additional_platforms ``` - E2E test ``` bioconda-utils build recipes config.yml --git-range origin/master HEAD bioconda-utils build recipes config.yml --git-range origin/master HEAD --force ``` - Fix test trigger by adding `fetch-depth` related: bioconda/bioconda-recipes#40550 --------- Signed-off-by: Yikun Jiang <[email protected]>
See #43708 for doing a check for any I'm going to start working on porting .github/workflows/bulk.yml to CircleCI next, assuming no one else has that in progress. |
* add libpdf support * add run_exports
(Ugh, should have done the merge from master in the GH interface, not the local rebase and push. Sorry for the commit noise) Anyway, to report back on all of this: CircleCI tokens are fixed and packages can be successfully uploaded to Anaconda. Images can also be uploaded to quay.io/biocontainers too, so artifacts are all working, BUT handling the images remains challenging and may need more discussion. Here's why (see details): LOTS OF DETAILS...We had initially discussed putting a Another approach would be to communicate across CI platforms with workflow dispatch:
This latter approach will still break when a PR is merged but artifacts are no longer available. Another idea: maybe we could do a scheduled nightly job that, upon seeing multiple archs for a package in the conda channel, builds multi-arch images out of those packages. That is, normal CI jobs only upload conda packages; a separate, asynchronous job builds multi-arch images out of them. I think with e.g. If we go with TL;DR: I propose:
|
+1
This is for the images, right ? This way the user has a "workaround" in case there is a problem with the manifest! +1
This would be a matter of adding |
For item 2, yes, this is for the package images pushed to quay.io/biocontainers. Since manifests are a part of the OCI spec it's unlikely users would have trouble with it; in fact it's how many base docker images e.g. alpine are already provided. It's nice because you can use the same For item 4, the "patching" I had in mind was for cases where we had an arm package but not an arm container. So |
Would https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#check_suite work here ? |
I played with this idea and created a Github App https://github.com/martin-g/my-first-github-app/blob/main/index.js that listens on
even when a CircleCI check fails - martin-g/circleci-arm64-test#5 If a Github Action check (
|
https://discuss.circleci.com/t/configure-circleci-checks-to-trigger-github-actions-workflow/50435 gives me hope! Testing it! |
It does work ! And the Github App is not really needed. If the payload has |
+1, very exciting to to see this happening!
+1, I think it is reasonable, we can improve it step by step! |
Oh, we are that close!!! |
I see with this merge a linux-aarch64 build has now appeared for the test package abra2. 🎉 Does this mean it is time for interested maintainers to start adding |
Yes!! Please add I'll update at #33333, need to get the docs fully deployed first though (that is in progress). pysam, samtools, htslib are among the highest out-degree centrality of the entire bioconda channel DAG, so if you want to get those working that would be a huge help. |
You will be unsurprised to hear those are precisely the packages I have in mind. 😄 |
Awesome work everyone! Thank you @daler for taking the lead, as well as everyone else for providing tremendous feedback and all the behind the scenes PRs! If you update recipes to opt-in to ARM builds, please feel free to request me as a reviewer! |
Support for arm builds (macos-M1 and linux-graviton) via CircleCI.
TODOs
# [arm64]
) on build::skip as usual, or shall we not build by default and only enable it if something special is added to extra? Decision of bioconda/core: opt-in in the first round, via a special field in extra (see next item)