-
Notifications
You must be signed in to change notification settings - Fork 558
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
Out of memory when building multi-platform images #621
Comments
I'm having this issue when running "cargo fetch", the container gets OOMkilled before it even gets through that. Has anyone figured out a workaround? |
Make builds run in parallel because build is failing with out of memory error. See docker/build-push-action#654 (comment) and docker/build-push-action#621
Try to fix out of memory error on GH Actions build. See docker/build-push-action#654 (comment) and docker/build-push-action#621
Fix out of memory error on GH Actions build and automate GitHub Release with artifacts ( #47). See docker/build-push-action#654 (comment) and docker/build-push-action#621
Fix out of memory error on GH Actions build and automate GitHub Release with artifacts ( #47). See docker/build-push-action#654 (comment) and docker/build-push-action#621
Fix out of memory error on GH Actions build and automate GitHub Release with artifacts ( #47). See docker/build-push-action#654 (comment) and docker/build-push-action#621
Fix out of memory error on GH Actions build and automate GitHub Release with artifacts ( #47). See docker/build-push-action#654 (comment) and docker/build-push-action#621
I found your blog @yaleman and for me |
For anyone who stumbles across here, it seems to be a problem with [net]
git-fetch-with-cli = true in the |
Add workaround for docker/build-push-action#621. Fixes failing ARM Linux builds. See Also 1. <docker/build-push-action#621>
Add workaround for docker/build-push-action#621. Fixes failing ARM Linux builds. See Also 1. <docker/build-push-action#621>
Add workaround for docker/build-push-action#621. Fixes failing ARM Linux builds. See Also 1. <docker/build-push-action#621>
Add workaround for docker/build-push-action#621. Fixes failing ARM Linux builds. Longer-term, we may want to explore pre-downloading with `cargo vendor` or seeing if the Rust `cross` command is any better. See Also 1. <docker/build-push-action#621>
Instead of downloading sources once per job, or trying to keep cargo caches for them separately, use *one* dependency cache that is generated with `cargo vendor`. The vendored sources are platform-independent and support all targets and all features. This is a substantial speed boost for our Docker Actions on non-x86_64 platforms, and it is also a workaround for docker/build-push-action#621. See Also 1. <docker/build-push-action#621>
This solution works, but the Git executable needs to be part of the Docker image used for the build. You will either need to use a full Debian (not There is a faster way: execute My workflow takes advantage of the Github Some things of note:
EDIT: The full Debian images have Git, but the |
I don't think it's correct. The official Rust docker image (debian-based) is built from Maybe you meant the alpine-based Rust image? As I can see it doesn't install |
Thanks for checking this for me. You are correct! My build was using both the I still believe my approach will result in faster and more efficient CI runs in many cases—especially when dependencies need to be (re)fetched or rebuilt. It is, however, slightly more complex. |
You might also be interested by https://github.com/crazy-max/rust-docker-cross/blob/main/Dockerfile to build multi-platform image using cross compilation with |
Hello, I'm having some issues building
arm64
images with this action. Strangely, the build was fine in some previous jobs.Expected behaviour
Build should finish normally.
Actual behaviour
Build got killed, probably because of memory issues.
Configuration
Here's the workflow:
Logs
I also tried to build locally using
buildx
, andarm64
builds also got killed because the host machine ran out of memory. I saw people were getting similar errors on docker/buildx#292 and docker/buildx#359. There is a proposal here but there has been no updates since. Is there any other way I can limit the memory of the builders?The text was updated successfully, but these errors were encountered: