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

Publish images for the linux/arm64 Docker platform #78

Open
ianks opened this issue Nov 6, 2022 · 9 comments · Fixed by #137
Open

Publish images for the linux/arm64 Docker platform #78

ianks opened this issue Nov 6, 2022 · 9 comments · Fixed by #137

Comments

@ianks
Copy link

ianks commented Nov 6, 2022

In #76 I mentioned a request to publish linux/arm64 Docker images. Currently, building on M1 is unbearably slow in many cases due to the virtualization overhead. I’ve almost given up on running RCD locally as a result.

Using linux/arm64 images removes the virtualization overhead and makes the local development experience much better.

@flavorjones
Copy link
Collaborator

@ianks I'm curious - is the aarch64-linux support not sufficient for your needs?

@ianks
Copy link
Author

ianks commented Jan 17, 2024

@ianks I'm curious - is the aarch64-linux support not sufficient for your needs?

I'm referring to the issue of compiling x86_64-linux on an arm64 machine. Currently, that requires full CPU emulation. Ideally, RCD could cut the x86_64-linux, etc images for multiple Docker platforms (linux/arm64 and linux/amd64)

@flavorjones
Copy link
Collaborator

Ah, right, I had totally forgotten the original context of this issue. Thanks for re-explaining.

@ianks
Copy link
Author

ianks commented Sep 7, 2024

@flavorjones I think this issue becomes simple to tackle now with Ubuntu base images

@flavorjones
Copy link
Collaborator

@ianks If you have the bandwidth, I'd gladly accept help. I'm unlikely to get to this in the next few weeks.

@ianks
Copy link
Author

ianks commented Dec 20, 2024

Been working on adding support to the cross-rs images, since they have all the bells and whistles already and already inherit from ubuntu:20.04. Once I get that merged, it should be a one line change here (and likely able to remove a bunch of code)

cross-rs/cross#1597

larskanis added a commit that referenced this issue Dec 29, 2024
This way we can provide not only images running on x86_64 but also aarch64.
The docker platform names are "linux/amd64" and "linux/arm64".

Fixes #78
larskanis added a commit that referenced this issue Dec 30, 2024
This way we can provide not only images running on x86_64 but also aarch64.
The docker platform names are "linux/amd64" and "linux/arm64".

On the native platform (x86_64-linux or aarch64-linux) ruby configure script finds libz and libcrypt and makes use of it in libruby.
Disabling them per ac_cv_* variables unifies cross builds and we can remove platform specific injection of -lz and -lcrypt into mkmf.rb .

Fixes #78
@larskanis
Copy link
Member

I re-enable this issue since we don't have a automated build process for arm64 right now as discussed here.

@larskanis larskanis reopened this Dec 31, 2024
@flavorjones
Copy link
Collaborator

@ianks How do you automate builds for the cross-rs arm64 platform images? Any advice here?

I poked around a bit and it looks like we might be able to apply for free credits to run ARM hardware as an open-source project: https://github.com/WorksOnArm/GitHub-Runners

Some related references:

Or we could just spin up a runner of our own on GCP or AWS, especially if we can get enough credits to cover it.

@flavorjones
Copy link
Collaborator

@larskanis said in #140:

To my understanding, per platform images can not be simply appended after pushing. Either the two host platforms must be pushed by one buildx command or two images must be pushed separately with different names and then a manifest with links to them must be pushed.

The rake task release:images uses the first method. So we can not release x86 from CI and arm from local that way.

If we can't figure out a way to push both platforms from CI, then I think we need to consider doing the manifest approach to decouple the two build processes. But I've never tried the manifest approach to stitch together images into a release, so I don't know what I don't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants