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

Use Buildx Bake for faster build times #130

Closed
wants to merge 1 commit into from
Closed

Use Buildx Bake for faster build times #130

wants to merge 1 commit into from

Conversation

damacus
Copy link
Contributor

@damacus damacus commented Feb 24, 2021

No description provided.

@damacus
Copy link
Contributor Author

damacus commented Feb 25, 2021

I'm interested to see if this is a thing we want here. I'm quite keen to see if we can speed up the build time and parallelise more of the builds.

Long term goals

  • Have all the Dockerfiles build using one large docker-compose.yaml file
  • Use depends_on to mark images that require building first

Pros

  • Less files to maintain
  • Parallelised builds using the "new" buildx builder

Cons

  • Moving how the images are built might not be necessary

@cboettig
Copy link
Member

Thanks @damacus , we're definitely willing to consider more improvements to the build process. Faster, more parallelised builds would be nice, but we also want to maintain (or rather improve) the modularity of the build process.

We actually do use depends_on in some compose files, like core and cuda stacks. We actually intended to put everything in a single compose file initially, (at least within a fixed version, say), and I think this could be done by merging the relevant stack .json files.

IIRC, one barrier was with the CI system -- we hit build timeouts or size limits trying to build the whole stack that way, so it was useful for some of the later images in the stack to be in separate files that didn't assume GH-Actions could build all the base images first. (Even so GH-Actions struggles with those larger images as you probably noticed). We could go back to DockerHub based builds, but would need CRON triggers and their system has been a bit cumbersome.

Not sure if any of that is helpful, but in meantime buildx seems like a reasonable step.

@damacus
Copy link
Contributor Author

damacus commented Mar 30, 2021

That's cool. I'm going to close this out as I'm moving jobs and won't have time to focus on this. But feel free to take my code as an example 👍🏼

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

Successfully merging this pull request may close these issues.

2 participants