[WIP] Multi-stage build for Dockerfile.dependencies_humble#3900
Draft
karttikjangid wants to merge 4 commits into
Draft
[WIP] Multi-stage build for Dockerfile.dependencies_humble#3900karttikjangid wants to merge 4 commits into
karttikjangid wants to merge 4 commits into
Conversation
Contributor
Author
Follow line exercise is working .
@javizqh can you also please do your testing and tell me if you find any problem i am also doing testing only
|
Contributor
Author
|
In the visual object detection it is showing up that the connecting to Robotics Backend for 10-15 mins without any error in logs , can you check from your side ? |
- ARG NVIDIA_VISIBLE_DEVICES → ENV so the value persists into runtime - Remove no-op RUN source in Dockerfile.humble (subshell, no effect)
Splits into deps-builder (compiles everything, unchanged from original) and deps-final (runtime + toolchain retained, since Dockerfile.humble compiles directly on top of this image). No changes to colcon invocations or --symlink-install. Verified: full ldd sweep across both workspaces, endpoint/DB/websocket tests via docker compose, image size 11.9GB -> 10.7GB measured same-day against a fresh rebuild of the original file.
2f9b204 to
5ff934d
Compare
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.

This is a full multi-stage rewrite of Dockerfile.dependencies_humble, not
a small tweak — the diff goes from 373 to 635 lines. Opening as Draft
since to showcase the changes i will make in it in upcoming days .
What changed
Split into two stages:
deps-builder: unchanged from the original file — same commands, sameorder, compiles everything (ROS workspaces, gz_ros2_control, aerostack2).
deps-final: new. Reinstalls only the packages actually needed, copiesthe compiled workspace output wholesale (no subsetting), keeps the full
ROS build toolchain.
Why the toolchain stays
Dockerfile.humble compiles CustomRobots/jderobot_drones/Industrial/
common_interfaces_cpp directly on top of this image via its own colcon
build call. A pure-runtime deps-final would break that build. Confirmed
via Slack
What got trimmed
call-graph trace (dead code, not just unused-by-assumption).
started in this image, only the client library psycopg2 links against.
Verified
passing.
rebuilt copy of the original file (not an old/stale number).
Out of scope for this PR
once this is merged or another approach would be to change both of them test them completely giving some more time and then merge both pr's.
docker compose (two database init SQL files had been emptied locally,
unrelated to this Dockerfile) — already fixed locally, root cause
still being looked into separately, not caused by and not blocking
this PR.
Question before this is ready for full review
Does the toolchain-kept approach match what you had in mind here?