Repository navigation
Conversation
The universe-devel stage runs colcon on all of src, so it builds every package of the core image again and installs it over the prebuilt copy in /opt/autoware. The stage now reads the package names of the core image from /opt/autoware/*/share/colcon-core/packages and passes them to --packages-ignore. The universe packages then use the prebuilt core packages from the underlay. The CPU core images do not hold src/core/cuda, so the CPU universe stage still builds it. Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
Contributor
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
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.
Description
The
universe-develstage runs colcon on all ofsrc. So it builds every package of its core image again, and installs it over the prebuilt copy in/opt/autoware. This PR makes the stage skip those packages. This is PR 6 of the plan in:The stage now reads the names of the prebuilt packages from
/opt/autoware/*/share/colcon-core/packages/and passes them to--packages-ignore. The universe packages then find the core packages in the underlay, because the stage sources/opt/autoware/setup.shbefore the build.The list comes from the image, not from a fixed list in the Dockerfile. So it fits both variants:
universe-develcore-develsrc/core/cudauniverse-devel-cudacore-devel-cudasrc/core/cudaThe CPU core images do not hold
src/core/cuda. So the CPUuniverse-develstill buildsautoware_cuda,cuda_blackboardandnegotiated, the same as before.The
# hadolint ignore=SC2086line allows the unquoted${core_packages}, so that each name is one argument.core.Dockerfileuses the same pattern for${cuda_paths}. Package names have no spaces. A bash array fails Hadolint, because Hadolint checks thisRUNas POSIXsh.The
universe-dependenciesstage and theuniversestage do not change. Theirrosdep installsteps already pass--ignore-src, and the prebuilt packages are in the underlay.How was this PR tested?
See the verification block below.
AI usage
AI usage: Claude Code made the change from the plan in the issue above, ran the checks below, and wrote this description.
Self-review: Not reviewed yet.
Verification: Hadolint passed, and the shell lines of the change ran under
dashin a localcore-devel-jazzyimage withcolcon list. No image build ran yet.pre-commit
pre-commit run --files docker/universe.Dockerfilepassed, Hadolint included.mapfileand"${core_packages[@]}"). Hadolint reportedSC3054 warning: In POSIX sh, array references are undefined., also with aSHELL ["/bin/bash", ...]line in the stage. The second version uses a plain variable and passed.Package list in a local core image
A local
autoware:core-devel-jazzyimage (CPU), with thesrcof my workspace mounted. This image is older than thatsrc.basename -a /opt/autoware/*/share/colcon-core/packages/*printed 134 names./bin/shis/usr/bin/dash.colcon list --base-paths /tmp/autoware/srclisted 502 packages. With--packages-ignore ${core_packages}, it listed 368 and exited 0.src/core/cuda(autoware_cuda_dependency_meta,autoware_cuda_utils,autoware_tensorrt_common,cuda_blackboard). They also hold 6 core packages that this older image does not have, for exampleautoware_utils_launch. In CI, the core image andsrccome from the same commit.--packages-ignoreprintsWARNING:colcon.colcon_core.package_discovery:ignoring unknown packageand does not stop the build.Not run
universe-develoruniverse-devel-cudawith this change. Thehealth-checkCI of this PR builds the CPUuniverse-develfor Humble and Jazzy on amd64.workflow_dispatchrun ofdocker-build-and-pushon this branch can build them.mainrun 41462201289 thejazzy-amd64 / build-universe / ci-universejob printedSummary: 496 packages finished [41min 51s].