rblaine95 / docker-monero

My personal, unprivileged, Docker Image to make running a full Monero Node as easy as possible.
https://getmonero.org
The Unlicense
12 stars 2 forks source link

Multi-Arch Builds #14

Closed rblaine95 closed 3 years ago

rblaine95 commented 3 years ago

AMD64, ARMv7, ARMv8 for now Dropped pushing to Quay and Dockerhub

Closes #6

rblaine95 commented 3 years ago

Downside is build time takes very, very long.

The github actions instances only have 2vCPU and 7GB of memory and we're running 3 simultaneous builds on them.

One solution could be to use a matrix so that each architecture is built on its own instance and can fully utilize the available resources. Then we'd need a final step that consolidates the tags. Specifically doing it "The hard way with docker manifest"

rblaine95 commented 3 years ago

I strongly suspect the 1.5-2 hour build time for arm64/v8 and arm/v7 is because of QEMU on an amd64 instance.

Running the same build but with -j7 instead of -j2 on my M1 Mac Pro:

» docker build --platform linux/arm64/v8 -t monero:arm64 .
[...]
 => [builder 5/5] RUN cd monero &&     case "$(uname -m)" in       x86_64) make -j7 release-static-linux-x86_64;;       aarch64* | arm64 | armv8*) make -j7 rel  559.7s

The linux/arm64/v8 build completed in 559.7 seconds

Trying to build for amd64 on my M1 Mac Pro gave the same results in reverse:

» docker build --platform linux/amd64 -t monero:amd64 .
[...]
 => CANCELED [builder 5/5] RUN cd monero &&     case "$(uname -m)" in       x86_64) make -j7 release-static-linux-x86_64;;       aarch64* | arm64 | armv8*) mak  602.9s

I canceled after hitting the 600 second mark, build was at 58% progress.

I believe the solution to this would be to have ARM runners.