metacall / guix

Docker image for using Guix in a CI/CD environment.
https://metacall.io
Apache License 2.0
36 stars 5 forks source link

Solve issues in docker multi architecture builds (linux/arm/v7, linux/arm64/v8, linux/ppc64le) #6

Open viferga opened 1 month ago

viferga commented 1 month ago

linux/arm/v7

It seems this issue depends on the kernel image, we should investigate it further:

          # guix error: cloning builder process: Invalid argument (https://lists.gnu.org/archive/html/help-guix/2017-12/msg00023.html)
          # { docker: linux/arm/v7, guix: armhf-linux },

Reference: https://lists.gnu.org/archive/html/help-guix/2017-12/msg00023.html

linux/arm64/v8, linux/ppc64le

For OOM, we should find a way to tweak QEMU options and truly investigate if the OOM is reached due to QEMU limits or the VM from GitHub itself. Here's the reference:

          # ERROR: failed to solve: ResourceExhausted: process "/bin/sh -c sh -c '/entry-point.sh guix pull ..." did not complete successfully: cannot allocate memory
          # { docker: linux/arm64/v8, guix: aarch64-linux },
          # { docker: linux/ppc64le, guix: powerpc64le-linux }

Reference: https://github.com/docker/setup-qemu-action https://hub.docker.com/r/tonistiigi/binfmt https://github.com/tonistiigi/binfmt

Bcoderx6 commented 1 month ago

I’ve attempted several strategies to resolve the multi-architecture build issues, including:

1. Limiting Guix to a single job (Guix=jobs=1)

2. Increasing the swap space to 16GB

3. Setting memory limits to 4GB for Docker containers

4. Splitting commands in the Dockerfile

5. Commenting out other platforms

6. Trying different base images

7. Installing Guix via the official Guix script

viferga commented 1 month ago

@Bcoderx6 thank you so much for the investigation.