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

Find a way to automatically build and push x86_64 and aarch64 images #27

Open
ericcurtin opened this issue Aug 1, 2024 · 7 comments
Open

Comments

@ericcurtin
Copy link
Collaborator

quay.io can only automatically build x86_64

aarch64 is important, this is tested to work on Apple Silicon/macOS with podman machine and libkrun.

we just need to figure out a way to push aarch64 images.

@ericcurtin
Copy link
Collaborator Author

ericcurtin commented Aug 1, 2024

@rhatdan this is essential for the podman machine use case on macOS

https://github.com/ericcurtin/ramalama/issues/14

Migrated from above, @cooktheryan has an idea how to do it...

I don't know how to automate pushing multi-arch container builds to quay.io

@rhatdan
Copy link
Member

rhatdan commented Aug 1, 2024

@cevich has set something up on Podman to do this automatically I believe using a systemd-timer or cron job.

Chris any pointers on how to do this?

@cevich
Copy link
Member

cevich commented Aug 5, 2024

Yes, and for Buildah and Skopeo and an AIO image as well. The implementation is over in https://github.com/containers/image_build but it relies on Cirrus-CI and private VM resources. At it's core is a bash script that may/not be fit-for-purpose here.

If your builds are basic, I would suggest your they could be done using the Buildah github action. However, be warned that the containers-org is operating near the free-tier limit of 20-runners, so jobs may be stalled or delayed. If you have a way to provide your own runners (for this repo) that would be great. Otherwise it should probably be fine with (for example) once-per-day builds but I can't guarantee anything long-term 😞

@ericcurtin
Copy link
Collaborator Author

@cooktheryan

I want to open a PR that does something like this:

RUN    if [ "$(uname -m)" = "aarch64" ]; then \
      dnf copr enable -y slp/mesa-krunkit && \
      dnf install -y mesa-libOpenCL-23.3.5-102.aarch64 \
        mesa-vulkan-drivers-23.3.5-102.aarch64 && \
      dnf versionlock mesa-libOpenCL-23.3.5-102.aarch64 \
        mesa-vulkan-drivers-23.3.5-102.aarch64; \
    fi && \

one thing that could be super helpful is to build both for aarch64 and x86_64 per PR (but not push). At the moment we just do x86_64 it would be better to do both to avoid breakages in the nightly build.

Thanks for pushing on the nightly builds btw.

@debarshiray
Copy link
Member

We have been doing this for a while for the built-in Arch Linux and Ubuntu images for Toolbx:
https://github.com/containers/toolbox/tree/main/.github/workflows

We rebuild the images every Monday, even if their sources haven't changed, and we rebuild them when their sources have been changed.

@rhatdan
Copy link
Member

rhatdan commented Nov 20, 2024

Care to open a PR to do this on RamaLama?

@debarshiray
Copy link
Member

It was @travier who did all the heavy lifting and I still have one Podman pull request that I should wrap up before I can get to this one.

In short, you can start by copy pasting one of the YAML files from https://github.com/containers/toolbox/tree/main/.github/workflows and replacing the specifics, like the paths to the image sources, etc.. QUAY_ROBOT_TOKEN is added to the GitHub project's settings under secrets and variables. I forgot if there was something that needed to be done on Quay, but I am sure @travier will remember.

In short, it's simple, but one needs to devote some time to iron out the annoying details, and I am struggling to find the time to own that work. :/

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

No branches or pull requests

4 participants