bioconda-recipes icon indicating copy to clipboard operation
bioconda-recipes copied to clipboard

Suggestion: Consider making Aarch64 builts ?

Open DrYak opened this issue 4 years ago • 25 comments

A weird outlandish suggestion. Given that:

...would the bioconda project eventually consider enabling Aarch64 builds of its package ?

DrYak avatar Jul 29 '20 17:07 DrYak

Eventually? Yes. Today? No.

You are welcome to get the necessary infrastructure in place to support that kind of build, we'd welcome a PR. Many packages require extra effort for every build target though, and unless there is a real need, it's difficult to justify. Just MacOS in addition to Linux already is a burden.

epruesse avatar Aug 01 '20 19:08 epruesse

@epruesse Thanks for the response. What's the process to add arm64 / aarch64 support to an existing recipe? We could document that, for users who want to self-service.

mr-c avatar Aug 07 '20 13:08 mr-c

We can't just add it for a single recipe. You'd have to start by creating the infrastructure parts for the new build target. Then you'd try to build all 6000 recipes. Many will fail, so you will have to fix them, making sure that they still build under both other target platforms. Once you have a reasonable set of packages done, say 5000 or so, you could give up and mark the rest with skip: True # [aarch64]. But you will be touching thousands of packages to get this on the road.

epruesse avatar Aug 07 '20 14:08 epruesse

@DrYak Your original post also missed that Arm-based servers are also now readily available in the AWS cloud with Graviton2. I can help with access to native Arm64 build infrastructure if that will help someone work on building/testing of Arm64? As a first pass it would be useful to get a view of how many recipes may just work and then analyze the characteristics of those that fail to see if there are any patterns to the failure modes that would help address 'blocks' of failures.

JeffUnderhill avatar Aug 11 '20 04:08 JeffUnderhill

For official packages, we use free public services only. Initially it was TravisCI, now CircleCI and Github Actions for the bulk bioconductor packages. Conda-forge is using Azure. I assume that they are using a cross compiler. Personally I think we have a lot of other areas that need work, but if you guys want to work on this, as I said, you are welcome. Head over to bioconda-utils, make a fork, set up some build chain. If in doubt you can always post the packages to a custom conda channel to start with.

epruesse avatar Aug 12 '20 01:08 epruesse

As a first pass it would be useful to get a view of how many recipes may just work and then analyze the characteristics of those that fail to see if there are any patterns to the failure modes that would help address 'blocks' of failures.

That is true. @JeffUnderhill you could for example try to rebuild bioconda on those AWS instances and see how far you will come.

bgruening avatar Aug 12 '20 06:08 bgruening

Circling back to this, I'm up for volunteering some of my time to work on aarch64 (ARM) builds.

mjsteinbaugh avatar Sep 23 '21 13:09 mjsteinbaugh

Seems like this is also under discussion in https://github.com/bioconda/bioconda-utils/issues/706 with more recent comments.

tfenne avatar Mar 01 '22 03:03 tfenne

Yes please!

jeffreykstone avatar Apr 20 '22 16:04 jeffreykstone

Notably, conda-forge has an osx64-arm channel - so it would be great if this could get off the ground for bioconda, too.

At some point in the near future, almost all users of osx will be using apple silicon - at which point it would be weird to use emulation for all of bioconda.

Are there free-to-use resources now to build for osx-ARM? Things may have changed a lot since the first comments ~2y ago.

corneliusroemer avatar Aug 08 '22 17:08 corneliusroemer

Are there free-to-use resources now to build for osx-ARM?

osx-arm64 support is on the roadmap for GitHub actions! :octocat: More discussion here.

colinbrislawn avatar Aug 24 '22 00:08 colinbrislawn

Per Github roadmap, osx-arm64 support is now scheduled to arrive in Q3 of 2023 🎉

However, this wouldn't help with Linux aarch64. Is there a reason that we need to use Github actions? Isn't the current CI Azure based anyways?

corneliusroemer avatar Jan 25 '23 12:01 corneliusroemer

Just curious, how many build resources are needed to support bioconda linux aarch64?

Before the Github-hosted host supported linux aarch64, the self hosted runner or run-on-arch-action (qemu based) Could it be an alternative as aarch64 build resource?

Yikun avatar Jan 31 '23 07:01 Yikun

I use the following script to build Bioconda packages on Linux ARM64:

#!/usr/bin/env bash

# a Conda virtual environment to keep the things clean and tidy
conda activate biotest

YEAR=$(date +%Y)
MONTH=$(date +%m)
DAY=$(date +%d)
HOUR=$(date +%H)
MINUTE=$(date +%M)

LOG_FOLDER=logs/${YEAR}/${MONTH}/${DAY}/${HOUR}/${MINUTE}
mkdir -p ${LOG_FOLDER}

BIOCONDA_RECIPES_ROOT=${1:-$PWD/recipes}
DOCKER_BASE_IMAGE="ghcr.io/yikun/bioconda-utils-build-env-cos7-aarch64"
MULLED_CONDA_IMAGE="ghcr.io/martin-g/create-env-aarch64"

for recipe in $(ls ${BIOCONDA_RECIPES_ROOT}); do
	echo -e "\n\nGoing to build recipe '$recipe'";
	
	bioconda-utils build \
		--docker \
		--mulled-test \
		--docker-base-image ${DOCKER_BASE_IMAGE} \
		--mulled-conda-image ${MULLED_CONDA_IMAGE} \
		--packages ${recipe} \
	        2>&1 | tee ${LOG_FOLDER}/${recipe}.log
done

So far I have built 100+ recipes. Some of them fail, some pass, but the tooling (bioconda-utils) seems to work just fine!

martin-g avatar Apr 25 '23 10:04 martin-g

Entering Q4 of 2023 -- any update on this issue?

phiweger avatar Oct 16 '23 18:10 phiweger

Entering Q4 of 2023 -- any update on this issue?

  • https://github.com/bioconda/bioconda-recipes/pull/40550
  • https://github.com/bioconda/bioconda-containers/pull/55 and https://github.com/bioconda/bioconda-containers/pull/58

martin-g avatar Oct 17 '23 09:10 martin-g

Can't wait for this!

pditommaso avatar Oct 19 '23 08:10 pditommaso

Here is the updated version of the script I shared earlier. Now it uses the official Docker images:

#!/usr/bin/env bash

conda activate biotest

YEAR=$(date +%Y)
MONTH=$(date +%m)
DAY=$(date +%d)
HOUR=$(date +%H)
MINUTE=$(date +%M)

LOG_FOLDER=logs/${YEAR}/${MONTH}/${DAY}/${HOUR}/${MINUTE}
mkdir -p ${LOG_FOLDER}

BIOCONDA_RECIPES_ROOT=${1:-$PWD/recipes}
RECIPES=$2
if [ -z $RECIPES ]; then
        RECIPES=$(ls ${BIOCONDA_RECIPES_ROOT})
fi
echo "Recipes: $RECIPES"

# New official Docker images that support Linux ARM64 !
DOCKER_BASE_IMAGE="quay.io/bioconda/bioconda-utils-build-env-cos7-aarch64"
MULLED_CONDA_IMAGE="quay.io/bioconda/create-env"

for recipe in $RECIPES; do

                echo -e "\n\nGoing to build recipe '$recipe'";
                
                bioconda-utils build \
                        --docker \
                        --mulled-test \
                        --force \
                        --docker-base-image ${DOCKER_BASE_IMAGE} \
                        --mulled-conda-image ${MULLED_CONDA_IMAGE} \
                        --packages ${recipe} \
                        2>&1 | tee ${LOG_FOLDER}/${recipe}.log
done

martin-g avatar Oct 19 '23 11:10 martin-g

There's a lot of progress! Looks like aarch64 will happen in the next few weeks. And eventually also arm64. See:

  • https://github.com/bioconda/bioconda-docs/pull/16

corneliusroemer avatar Dec 01 '23 20:12 corneliusroemer

Can't wait for it to happen!

pditommaso avatar Dec 01 '23 20:12 pditommaso

Is this supported yet?

rob-p avatar Dec 18 '23 20:12 rob-p

I see there is a lot of progress in the last weeks! But it is not very clear to me whether there are any stoppers at the moment. I'd be glad to help with testing and/or coding if such help is needed !

emiliofernandes avatar Dec 19 '23 08:12 emiliofernandes

@martin-g Does this go in the build.sh script in a Bioconda recipe?

Here is the updated version of the script I shared earlier. Now it uses the official Docker images: ...

Adamtaranto avatar Feb 01 '24 23:02 Adamtaranto

@Adamtaranto No! This is a custom shell script that I use locally to build/test recipes on Linux ARM64. Once Bioconda officially adds the support for Linux ARM64 then you will just need to add to following to a recipe:

extra:
  additional-platforms:
    - linux-aarch64

See https://github.com/bioconda/bioconda-utils/pull/923

martin-g avatar Feb 05 '24 16:02 martin-g

Per the docs, linux aarch64 now appears to be supported. image https://github.com/bioconda/bioconda-docs/pull/16/files

corneliusroemer avatar Mar 05 '24 13:03 corneliusroemer