-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Speed up Docker image builds using multi-stage parallel pipelines #987
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debanjum
force-pushed
the
speed-up-khoj-docker-builds
branch
7 times, most recently
from
November 24, 2024 18:50
420b0b1
to
5a41ded
Compare
Decouple web app, server builds in parallel to speed up Docker builds
debanjum
force-pushed
the
speed-up-khoj-docker-builds
branch
from
November 24, 2024 21:12
5a41ded
to
0f0f5f5
Compare
debanjum
force-pushed
the
speed-up-khoj-docker-builds
branch
5 times, most recently
from
November 25, 2024 04:34
1f47aa0
to
16463f3
Compare
debanjum
force-pushed
the
speed-up-khoj-docker-builds
branch
from
November 25, 2024 04:41
16463f3
to
97de3b2
Compare
debanjum
force-pushed
the
speed-up-khoj-docker-builds
branch
from
November 25, 2024 05:11
97de3b2
to
4a5646c
Compare
sabaimran
approved these changes
Nov 25, 2024
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.
WOOHOO!!! So excited to have faster build times.
debanjum
added a commit
that referenced
this pull request
Nov 25, 2024
- Building arm64 image on an ubuntu arm64 runner reduces `yarn build' step time by 75% from 12mins to 3mins. - This is because no QEMU emulation for arm64 on x86 is required now - Parallelizing x64 and arm64 platform builds halves build time on top - Revert to use standard ubuntu-latest runner as large x64 runner doesn't give much more speed improvements This results an effective additional 50%-66% reduction in build time on top of #987. So a full dockerize workflow run now takes *10 mins* vs previous 35+mins. This is a total of *72% improvement* in max dockerize run time. Get additional speed improvements when docker layer cache hit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Improve build speed and size of khoj docker images
Changes
Improve docker image build speeds
Result: ~40% drop to 21mins from 35+mins for full build. ~5mins for rebuilds (as all layers can loaded from cache)
yarn install
andyarn build
steps)Reduce size of khoj docker images
Result: ~34% drop to 4.78Gb from 7.25Gb for default build
.dockerignore
to exclude unnecessary directoriesImprove web app builds
NODE_ENV=production
env var)