From b278834d43b9bbd708f6962c1209d9ea0f929a74 Mon Sep 17 00:00:00 2001 From: Michal Faferek Date: Fri, 5 Jun 2026 20:42:46 +0200 Subject: [PATCH] fix(demos): cap build parallelism to avoid gateway OOM Gateway has a few heavily-templated TUs (~1.6 GB RSS each); compiling them all in parallel (one per core) OOM-killed cc1plus on many-core or RAM-limited Docker hosts. Use a sequential executor + MAKEFLAGS='-j 2' (peak ~3.2 GB, verified building under a 6 GB cap). --- demos/moveit_pick_place/Dockerfile | 2 +- demos/multi_ecu_aggregation/Dockerfile | 2 +- demos/sensor_diagnostics/Dockerfile | 2 +- demos/turtlebot3_integration/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/moveit_pick_place/Dockerfile b/demos/moveit_pick_place/Dockerfile index b88e6ab..d6c41aa 100644 --- a/demos/moveit_pick_place/Dockerfile +++ b/demos/moveit_pick_place/Dockerfile @@ -76,7 +76,7 @@ RUN bash -c "source /opt/ros/jazzy/setup.bash && \ rosdep update && \ rosdep install --from-paths src --ignore-src -r -y || true" && \ bash -c "source /opt/ros/jazzy/setup.bash && \ - colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF" + MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF" # Setup environment RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \ diff --git a/demos/multi_ecu_aggregation/Dockerfile b/demos/multi_ecu_aggregation/Dockerfile index 0d39be7..e0d8fa9 100644 --- a/demos/multi_ecu_aggregation/Dockerfile +++ b/demos/multi_ecu_aggregation/Dockerfile @@ -57,7 +57,7 @@ RUN bash -c "source /opt/ros/jazzy/setup.bash && \ rosdep update && \ rosdep install --from-paths src --ignore-src -r -y \ --skip-keys='ament_cmake_clang_format ament_cmake_clang_tidy test_msgs example_interfaces sqlite3' && \ - colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF" + MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF" # Setup environment RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \ diff --git a/demos/sensor_diagnostics/Dockerfile b/demos/sensor_diagnostics/Dockerfile index 1e432ff..f6037ce 100644 --- a/demos/sensor_diagnostics/Dockerfile +++ b/demos/sensor_diagnostics/Dockerfile @@ -58,7 +58,7 @@ RUN bash -c "source /opt/ros/jazzy/setup.bash && \ rosdep update && \ rosdep install --from-paths src --ignore-src -r -y \ --skip-keys='ament_cmake_clang_format ament_cmake_clang_tidy test_msgs example_interfaces sqlite3' && \ - colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF" + MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF" # Setup environment RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \ diff --git a/demos/turtlebot3_integration/Dockerfile b/demos/turtlebot3_integration/Dockerfile index b1ce696..bc85bc1 100644 --- a/demos/turtlebot3_integration/Dockerfile +++ b/demos/turtlebot3_integration/Dockerfile @@ -78,7 +78,7 @@ WORKDIR ${COLCON_WS} RUN bash -c "source /opt/ros/jazzy/setup.bash && \ rosdep update && \ rosdep install --from-paths src --ignore-src -r -y && \ - colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF" + MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF" # Setup environment RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \