Skip to content

Commit 3c69954

Browse files
committed
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).
1 parent dbacf6b commit 3c69954

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

demos/moveit_pick_place/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ RUN bash -c "source /opt/ros/jazzy/setup.bash && \
7676
rosdep update && \
7777
rosdep install --from-paths src --ignore-src -r -y || true" && \
7878
bash -c "source /opt/ros/jazzy/setup.bash && \
79-
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF"
79+
MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF"
8080

8181
# Setup environment
8282
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \

demos/multi_ecu_aggregation/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RUN bash -c "source /opt/ros/jazzy/setup.bash && \
5757
rosdep update && \
5858
rosdep install --from-paths src --ignore-src -r -y \
5959
--skip-keys='ament_cmake_clang_format ament_cmake_clang_tidy test_msgs example_interfaces sqlite3' && \
60-
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF"
60+
MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF"
6161

6262
# Setup environment
6363
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \

demos/sensor_diagnostics/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN bash -c "source /opt/ros/jazzy/setup.bash && \
5858
rosdep update && \
5959
rosdep install --from-paths src --ignore-src -r -y \
6060
--skip-keys='ament_cmake_clang_format ament_cmake_clang_tidy test_msgs example_interfaces sqlite3' && \
61-
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF"
61+
MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF"
6262

6363
# Setup environment
6464
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \

demos/turtlebot3_integration/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ WORKDIR ${COLCON_WS}
7878
RUN bash -c "source /opt/ros/jazzy/setup.bash && \
7979
rosdep update && \
8080
rosdep install --from-paths src --ignore-src -r -y && \
81-
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF"
81+
MAKEFLAGS='-j 2' colcon build --executor sequential --symlink-install --cmake-args -DBUILD_TESTING=OFF"
8282

8383
# Setup environment
8484
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \

0 commit comments

Comments
 (0)