Code Monkey home page Code Monkey logo

Comments (5)

AnalogJ avatar AnalogJ commented on June 11, 2024 3

Thanks for all the help @jacobwgillespie @kylegalbraith !
I was able to get everything working, and fix my CI/CD pipeline as well. Depot has been working like a charm, multiarch builds are taking approx 5mins.

Once again, appreciate all your support, you've been incredibly generous 😃

from fasten-onprem.

AnalogJ avatar AnalogJ commented on June 11, 2024

Good call, I'll work on adding those soon.
Fasten is basically a simple Go binary, so this should be pretty easy to implement.

from fasten-onprem.

AnalogJ avatar AnalogJ commented on June 11, 2024

https://github.com/AnalogJ/scrutiny/blob/master/.github/workflows/docker-build.yaml

from fasten-onprem.

AnalogJ avatar AnalogJ commented on June 11, 2024

As discussed in the Fasten discord, here's the state of Multi-arch builds in Fasten, and a timeline of what's happened:

  • when v0.0.6 was released, we were only building AMD64 docker images via Github Actions

    • front-end and backend compilation was done separately in a single multi-stage Dockerfile
    • local Docker development and "production" Docker development uses the same Dockerfile
  • I attempted to add support for multi-arch builds, by uncommenting the docker/setup-qemu-action Github Action step.

    • this immediately caused build failures related to Yarn timeouts (There appears to be trouble with your network connection. Retrying...)
    • I investigated a handful of solutions to this, including yarn install --network-timeout 100000, clearing http proxies, changing the registry and clearing the cache -- none of these worked.
    • I recalled similar issues with ARM + NPM on QEMU and eventually determined that QEMU + ARM is orders of magnitude slower, and has significant issues when compiling repositories with lots of small files.
  • Eventually I decided to compile the frontend app outside of Docker as a separate artifact.

Possible solutions:

  • moving the Go binary build outside of Docker (building multi-arch via GOOS and GOARCH), and then passing the compiled artifacts into the Dockerfile during build.
    • NEGATIVES: local development will be following a non-standard Docker development workflow, instead of running docker build, users will be required to run a make command to compile outside of docker. Build pipeline becomes more complicated
  • move to custom Github Actions runners that support native (non-QEMU emulated) ARM
    • buildjet.com
    • depot.dev - (progress: conversation ongoing)
    • Azure Pipeline - (progress: only found QEMU based multi-arch build examples)

from fasten-onprem.

jacobwgillespie avatar jacobwgillespie commented on June 11, 2024

👋

I've opened PR #54 as an example of the Depot implementation - for some background, Depot is running managed BuildKit builders for both Intel and Arm in AWS, with a persistent 50GB SSD disk, so when build run they are able to instantly reuse the cache, no saving or loading needed.

For multi-arch builds, Depot launches both an Intel and an Arm VM and uses both, so things stay super fast and skip needing to use QEMU at all.

from fasten-onprem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.