Skip to content

Commit 511ff72

Browse files
authored
fix(docker): append set -o pipefail to return shell script's pipe error (#5881)
* simplify mount=type=bind options Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp> * append pipefail Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp> * remove trt_batched_nms Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp> --------- Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent 618b1f6 commit 511ff72

5 files changed

Lines changed: 16 additions & 5 deletions

File tree

docker/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} --dependency-ty
4646
&& cat /rosdep-core-exec-depend-packages.txt
4747

4848
COPY src/universe/external /autoware/src/universe/external
49+
# trt_batched_nms depends on autoware_tensorrt_common and autoware_cuda_utils, which are not available in universe-common-devel stage
50+
RUN rm -rf /autoware/src/universe/external/trt_batched_nms
4951
COPY src/universe/autoware.universe/common /autoware/src/universe/autoware.universe/common
5052
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
5153
> /rosdep-universe-common-depend-packages.txt \
@@ -216,7 +218,15 @@ RUN --mount=type=ssh \
216218
# hadolint ignore=SC1091
217219
RUN --mount=type=cache,target=${CCACHE_DIR} \
218220
--mount=type=bind,source=src/universe/autoware.universe/common,target=/autoware/src/universe/autoware.universe/common \
219-
--mount=type=bind,source=src/universe/external,target=/autoware/src/universe/external \
221+
--mount=type=bind,source=src/universe/external/eagleye,target=/autoware/src/universe/external/eagleye \
222+
--mount=type=bind,source=src/universe/external/glog,target=/autoware/src/universe/external/glog \
223+
--mount=type=bind,source=src/universe/external/llh_converter,target=/autoware/src/universe/external/llh_converter \
224+
--mount=type=bind,source=src/universe/external/morai_msgs,target=/autoware/src/universe/external/morai_msgs \
225+
--mount=type=bind,source=src/universe/external/muSSP,target=/autoware/src/universe/external/muSSP \
226+
--mount=type=bind,source=src/universe/external/pointcloud_to_laserscan,target=/autoware/src/universe/external/pointcloud_to_laserscan \
227+
--mount=type=bind,source=src/universe/external/rtklib_ros_bridge,target=/autoware/src/universe/external/rtklib_ros_bridge \
228+
--mount=type=bind,source=src/universe/external/tier4_ad_api_adaptor,target=/autoware/src/universe/external/tier4_ad_api_adaptor \
229+
--mount=type=bind,source=src/universe/external/tier4_autoware_msgs,target=/autoware/src/universe/external/tier4_autoware_msgs \
220230
source /opt/ros/"$ROS_DISTRO"/setup.bash \
221231
&& source /opt/autoware/setup.bash \
222232
&& /autoware/build_and_clean.sh ${CCACHE_DIR} /opt/autoware
@@ -253,6 +263,7 @@ RUN --mount=type=ssh \
253263

254264
# hadolint ignore=SC1091
255265
RUN --mount=type=cache,target=${CCACHE_DIR} \
266+
--mount=type=bind,source=src/universe/external/trt_batched_nms,target=/autoware/src/universe/external/trt_batched_nms \
256267
--mount=type=bind,source=src/universe/autoware.universe/perception,target=/autoware/src/universe/autoware.universe/perception \
257268
--mount=type=bind,source=src/universe/autoware.universe/sensing,target=/autoware/src/universe/autoware.universe/sensing \
258269
source /opt/ros/"$ROS_DISTRO"/setup.bash \

docker/scripts/build_and_clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -eo pipefail
33

44
function build_and_clean() {
55
local ccache_dir=$1

docker/scripts/cleanup_apt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -eo pipefail
33

44
function cleanup_apt() {
55
local apt_clean=$1

docker/scripts/cleanup_system.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -eo pipefail
33

44
function cleanup_system() {
55
local lib_dir=$1

docker/scripts/resolve_rosdep_keys.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -eo pipefail
33

44
function resolve_rosdep_keys() {
55
local src_path=$1

0 commit comments

Comments
 (0)