Skip to content

Clean up and Reorganise Dockerfile.orin #110

@Yunus-Selim

Description

@Yunus-Selim

The Dockerfile.orin has grown organically and accumulates redundant installations. Running rosdep install in the final stage may reinstall packages already present from earlier stages, and the dependency list across the three stages (nvidia-realsense, reseq-base, reseq) is not well organised.

Current problems

  • The reseq-base stage installs a long list of ROS packages (MoveIt, ros2_control, SLAM, rosbridge, etc.) via apt, then the final reseq stage runs rosdep install --from-path src which may re-resolve and attempt to install some of the same packages — wasting build time
  • Multiple apt update calls across the Dockerfile that could be consolidated
  • numpy==1.23.5 is installed twice (once after PyTorch, once after opencv-contrib-python)
  • Dependencies are scattered — some ROS packages are in reseq-base, others come in via rosdep in the final stage. It's unclear which are intentional pre-installs vs. redundant
  • Utility tools (ranger, nano, iproute2, usbutils) are mixed in with runtime dependencies
  • No cleanup of apt caches in some stages (some RUN blocks don't end with rm -rf /var/lib/apt/lists/*)

What needs to happen

  1. Audit the reseq-base apt installs against what rosdep install resolves from the workspace package.xml files — remove anything from reseq-base that rosdep will handle anyway in the final stage
  2. Consolidate the scattered pip installs (numpy, opencv-contrib-python, Jetson.GPIO, etc.) into fewer RUN layers
  3. Separate dev/debug tools (ranger, nano, rqt*, rviz2) so they can be easily excluded for a slimmer production image
  4. Ensure all apt-get calls clean up caches (rm -rf /var/lib/apt/lists/*) to reduce image size

Relevant files

  • Dockerfile: src/docker/Dockerfile.orin (423 lines, 3 stages)
  • Docker compose: src/docker/docker-compose.yaml
  • Entrypoint: src/docker/utils/ros_entrypoint.sh
  • Package XMLs: src/*/package.xml (define what rosdep resolves)
  • Dockerfile.orin docs

Documentation

After cleanup, update:

  • Dockerfile.orin — update the build stages table if stages change
  • Docker — update if workflow changes

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions