fix: Speedup system build time#603
Closed
sangngng wants to merge 2 commits into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR appears to adjust the build scripts to add parallel execution (via background jobs + wait) and tweak some comments/formatting.
Changes:
- Parallelized some
docker buildx ... --checksteps inbuild_system.shusing background jobs. - Parallelized parts of the rootfs extraction + post-processing in
build_system.shusing background jobs. - Added Markdown code fences (
bash /) around both shell scripts and updated a comment inbuild_kernel.sh.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| build_system.sh | Runs some Docker build checks and rootfs setup steps concurrently; also adds Markdown code fences. |
| build_kernel.sh | Adds Markdown code fences and updates a comment about “parallelization”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| #!/usr/bin/env bash | ||
| set -eo pipefail | ||
|
|
| @@ -137,3 +138,4 @@ exec_as_root umount -l $ROOTFS_DIR | |||
| exec_as_user img2simg $ROOTFS_IMAGE $OUT_IMAGE | |||
|
|
|||
| ```bash | ||
| #!/usr/bin/env bash | ||
| set -e | ||
|
|
Comment on lines
+50
to
+55
| docker buildx build -f Dockerfile.agnos --check $DIR & | ||
| docker buildx build --load -f Dockerfile.builder --check $DIR \ | ||
| --build-arg UNAME=$(id -nu) \ | ||
| --build-arg UID=$(id -u) \ | ||
| --build-arg GID=$(id -g) | ||
| --build-arg GID=$(id -g) & | ||
| wait |
Comment on lines
+104
to
+107
| "$DIR" | docker exec -i $MOUNT_CONTAINER_ID tar -xf - -C $ROOTFS_DIR & | ||
|
|
||
| # Avoid detecting as container | ||
| echo "Removing .dockerenv file" | ||
| exec_as_root rm -f $ROOTFS_DIR/.dockerenv | ||
| exec_as_root rm -f $ROOTFS_DIR/.dockerenv & |
Comment on lines
+129
to
+131
| exec_as_root bash -c "set -e; export ROOTFS_DIR=$ROOTFS_DIR GIT_HASH=$GIT_HASH; $(declare -f set_network_stuff); set_network_stuff" & | ||
|
|
||
| wait |
| } | ||
|
|
||
| # Run build_kernel in container | ||
| # Run build_kernel in container with parallelization |
This file contains hidden or 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
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.
Fix for #259. See details in body.