Skip to content

Build images with aarch64/arm64 support #47

Open

Description

@wdconinc

Several of the docker images for which recipes are provided here should work 'just fine' with aarch64 architectures to run natively on Mac M1/M2 architectures (fedora has a multiarch base images and fedora makes aarch64 packages available), but others may require work (ubuntu downloads the x86_64 build from root.cern, where no aarch64 is made available). Is it possible to push at a minimum 1 image with arm64 (i.e. aarch64) support to docker hub?

The procedure to build a multiarch image with least amount of effort (even if it would take a bit of time) is described in https://docs.docker.com/build/building/multi-platform/. Essentially, the following commands may be sufficient:

apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name builder --driver docker-container --bootstrap --use
docker buildx build --load --platform linux/arm64 -t rootproject/root:6.26.10-fedora36 -f fedora/Dockerfile fedora/

I am not a direct user, but it would facilitate our offerings of HSF Training workshops if Mac users could get up and running with an image that can run at native speeds. I think a phased rollout where not all images are supporting arm64 from the start would be fine.

Activity

  1. self-assigned this
    on Jan 17, 2023
  2. eguiraud commented on Jan 17, 2023

    @eguiraud
    Contributor

    Hi @wdconinc ,

    thank you for reaching out! Do I understand correctly that at least some of the current images can be used as-is, although with a performance penalty?

    At the moment we don't really have the personpower to work on this but I have assigned the issue to me so it doesn't get forgotten.

  3. wdconinc commented on Jan 17, 2023

    @wdconinc
    Author

    They can be used as is, but with a performance penalty due to emulation.

  4. meiyasan commented on Feb 21, 2024

    @meiyasan

    Hello @eguiraud , I was just about to ask the same as @wdconinc !
    It would be really great to provide both amd64/arm64 docker images.

    I was running some performance benchmark tests for computing resources estimations (K8s cluster) and I just discovered that my docker image wasn't arm64. This would be very useful if this was deployed with these two main architectures

  5. self-assigned this
    on Feb 22, 2024
  6. martamaja10 commented on Feb 22, 2024

    @martamaja10
    Contributor

    Hi @xkzl,

    thanks for reporting and we hear you. I also added myself to this issue. I will keep you updated once this is done (but it might be non-immediate).

    Cheers,
    Marta

  7. meiyasan commented on Aug 17, 2024

    @meiyasan

    Hi, @martamaja10 any progress on this ? I noticed some perfs issue on my ARM computers due to emulation of x86_64.
    Perhaps some adaptation might be possible to provide support for building both images using --platform options.

    docker buildx build --platform linux/amd64,linux/arm64 -t your-image-name .
    
  8. meiyasan commented on Feb 5, 2025

    @meiyasan

    Hi, I just want to share that I have been pushing through GitHub a docker repository with few versions of root compiled with both ARM and AMD. This is basically for free since GitHub is offering free runners on both AMD64 and ARM64.

    If interested, you can find the sources here and the overall project structure here:
    https://hub.docker.com/r/hepdock/root/tags

    I have been using it since quite a while and found to be satisfying for my use case. Feel free to use or request new version, as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions