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

fix: arm64 support #143

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

fix: arm64 support #143

wants to merge 2 commits into from

Conversation

taukakao
Copy link

@taukakao taukakao commented Oct 31, 2024

This is a working implementation for adding arm64 support.

Fixes #122

Good resources:
docker CI setup
multi-arch Dockerfile

The big issue with this is that it's extremely slow. In my testing the build time went from 3-4 min to about an hour.
I blame this mostly on the emulation done by QEMU here.

I think there are three valid implementations here:

  1. The existing code with emulation
    If a long build time is not a problem, then this might be a valid approach.

  2. Using cross compilation
    I tried to set this up with cargo but that seems to be rather difficult. Using something like cross should work, but I haven't tested this yet. While I think that would be a good solution I'm not sure if incorporating a third party tool is acceptable here.

  3. Using multiple runners
    Multiple runners as outlined here would probably work, but that would increase the complexity of the workflow significantly.

@joesturge I'm not sure if there is an optimal approach here so I'm leaving it up to you to decide, or maybe you have another idea.

@taukakao
Copy link
Author

Also, as a side note: The code duplication is needed since TARGETARCH is not defined before the first FROM statement when using buildx for some reason.

@taukakao
Copy link
Author

taukakao commented Nov 1, 2024

Seems like cross would also require major changes. It relies on containers itself so we would need to build everything outside of the Dockerfile since we can't use docker inside a docker build.

@taukakao
Copy link
Author

taukakao commented Nov 1, 2024

Multiple runners is also not really a solution since one runner would still take almost an hour.

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.

arm64 support & question
1 participant