-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: reuse cached layers to reduce build times #156
Conversation
scripts/build_push.sh
Outdated
@@ -4,15 +4,17 @@ set -e | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build_push.sh could be more general if we wanted. It could just take lists of
pull_before_build = [...] # (for caching)
tag_output = [...] # (for applying arbitrary number of tags that then get pushed)
I was lazy before and didn't make lists, but might make it more reusable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but should be reviewed by Blair or Brendan
Add layer caching to the CI to speed up deployment/testing. CI now does docker pull this_image:master prior to each docker build in order to pull the most recently built image in an attempt to get layers that docker build can cache from. If a perfect cache hit, each image builds in <5 min instead of 15-35 min. This also prevents rebuilding images unnecessarily (eg: if making a CPU-only change, the GPU images will just pull from cache rather than rebuild). In the worst case (editing base-notebook) this adds ~3-5min to build.
This Relates to PR #129 that is being split up into smaller PRs for review - for issue #146