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

Improve caching for local docker builds #14142

Merged
merged 4 commits into from
Jul 18, 2023
Merged

Improve caching for local docker builds #14142

merged 4 commits into from
Jul 18, 2023

Conversation

ewdurbin
Copy link
Member

@ewdurbin ewdurbin commented Jul 17, 2023

  • Caches apt metadata and downloads
  • Caches downloaded/built wheels
  • Caches npm

This will primarily be a speedup for local dev builds, as deployment builds using ephemeral buildkitd instances and relies on the layer cache.

Supersedes #10004 and #10021

@ewdurbin ewdurbin requested a review from a team as a code owner July 17, 2023 18:01
Dockerfile Show resolved Hide resolved
@ewdurbin ewdurbin force-pushed the modern_docker_build branch from f9e249e to 3f123ee Compare July 18, 2023 13:05
Copy link
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this a little bit, and confirm I don't see any detrimental behavior. I wasn't able to confirm the speedups yet, but hope that they materialize as I touch different parts of the filesystem.

@ewdurbin
Copy link
Member Author

Easiest way to see the speedup is to get things all spun up, then $ echo "#" >> requirements/main.txt then make serve again. Note that pip primarily relies on the cache for previously downloaded distributions and the built wheels.

@ewdurbin ewdurbin merged commit 4b51062 into main Jul 18, 2023
@ewdurbin ewdurbin deleted the modern_docker_build branch July 18, 2023 14:28
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.

3 participants