@@ -46,9 +46,10 @@ RUN apt-get -q update \
46
46
# - Installing blue deps using pip, apt and rosdep
47
47
# - Installs the remaining blue dependencies from blue_robot.repos
48
48
# - Installs deps from rosdep for all src dependencies
49
- # - colcon build
50
49
#
51
- FROM ci AS robot
50
+ # robot_unbuilt **does not** colcon build, to save time
51
+ #
52
+ FROM ci AS robot_unbuilt
52
53
53
54
#
54
55
# Ubuntu 24.04 "Noble", which is used as the base image for
@@ -135,11 +136,14 @@ RUN echo "if [ -f ${USER_WORKSPACE}/install/setup.bash ]; then source ${USER_WOR
135
136
&& echo "source $VIRTUAL_ENV/bin/activate" >> /home/$USERNAME/.bashrc \
136
137
&& echo "\n # Ensure colcon is run in the venv\n alias colcon='python3 -m colcon'" >> /home/$USERNAME/.bashrc
137
138
139
+ # Finally, build
140
+ FROM robot_unbuilt AS robot
138
141
139
142
# Actually build workspace
140
143
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
141
144
&& colcon build
142
145
146
+ FROM robot_unbuilt AS desktop_unbuilt
143
147
144
148
ENV DEBIAN_FRONTEND=noninteractive
145
149
ENV GZ_VERSION=harmonic
@@ -216,12 +220,6 @@ RUN sudo apt-get -q update \
216
220
&& sudo apt-get clean -y \
217
221
&& sudo rm -rf /var/lib/apt/lists/*
218
222
219
- # For users that build this on a laptop or system with limited RAM,
220
- # Modify the 'colcon build' line to be 'MAKEFLAGS="-j1 -l1" colcon build'
221
- # This will limit the amount of RAM that colcon is allowed to use
222
- RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
223
- && colcon build
224
-
225
223
# Setup the simulation environment variables
226
224
RUN <<EOT cat >> /home/$USERNAME/.bashrc
227
225
@@ -238,6 +236,15 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=\$HOME/ardupilot_gazebo/build:\$GZ_SIM_SYSTEM_P
238
236
export GZ_SIM_RESOURCE_PATH=\$ HOME/ardupilot_gazebo/models:\$ HOME/ardupilot_gazebo/worlds:\$ GZ_SIM_RESOURCE_PATH
239
237
EOT
240
238
239
+
240
+ FROM desktop_unbuilt AS desktop
241
+
242
+ # For users that build this on a laptop or system with limited RAM,
243
+ # Modify the 'colcon build' line to be 'MAKEFLAGS="-j1 -l1" colcon build'
244
+ # This will limit the amount of RAM that colcon is allowed to use
245
+ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
246
+ && colcon build
247
+
241
248
FROM desktop AS desktop-nvidia
242
249
243
250
# Install NVIDIA software
0 commit comments