@@ -46,9 +46,10 @@ RUN apt-get -q update \
4646# - Installing blue deps using pip, apt and rosdep
4747# - Installs the remaining blue dependencies from blue_robot.repos
4848# - Installs deps from rosdep for all src dependencies
49- # - colcon build
5049#
51- FROM ci AS robot
50+ # robot_unbuilt **does not** colcon build, to save time
51+ #
52+ FROM ci AS robot_unbuilt
5253
5354#
5455# 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
135136 && echo "source $VIRTUAL_ENV/bin/activate" >> /home/$USERNAME/.bashrc \
136137 && echo "\n # Ensure colcon is run in the venv\n alias colcon='python3 -m colcon'" >> /home/$USERNAME/.bashrc
137138
139+ # Finally, build
140+ FROM robot_unbuilt AS robot
138141
139142# Actually build workspace
140143RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
141144 && colcon build
142145
146+ FROM robot_unbuilt AS desktop_unbuilt
143147
144148ENV DEBIAN_FRONTEND=noninteractive
145149ENV GZ_VERSION=harmonic
@@ -216,12 +220,6 @@ RUN sudo apt-get -q update \
216220 && sudo apt-get clean -y \
217221 && sudo rm -rf /var/lib/apt/lists/*
218222
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-
225223# Setup the simulation environment variables
226224RUN <<EOT cat >> /home/$USERNAME/.bashrc
227225
@@ -238,6 +236,15 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=\$HOME/ardupilot_gazebo/build:\$GZ_SIM_SYSTEM_P
238236export GZ_SIM_RESOURCE_PATH=\$ HOME/ardupilot_gazebo/models:\$ HOME/ardupilot_gazebo/worlds:\$ GZ_SIM_RESOURCE_PATH
239237EOT
240238
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+
241248FROM desktop AS desktop-nvidia
242249
243250# Install NVIDIA software
0 commit comments