Skip to content

Commit c785d70

Browse files
committed
add force_cuda option
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent 3591106 commit c785d70

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \
277277
--mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/sensing/autoware_cuda_utils,target=/autoware/src/universe/autoware.universe/sensing/autoware_cuda_utils \
278278
source /opt/ros/"$ROS_DISTRO"/setup.bash \
279279
&& source /opt/autoware/setup.bash \
280-
&& /autoware/build_and_clean.sh ${CCACHE_DIR} /opt/autoware
280+
&& /autoware/build_and_clean.sh ${CCACHE_DIR} /opt/autoware true
281281

282282
COPY --from=universe-sensing-perception-devel /opt/autoware /opt/autoware
283283

docker/scripts/build_and_clean.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
function build_and_clean() {
44
local ccache_dir=$1
55
local install_base=$2
6+
local cuda_image=$3
7+
8+
local cmake_args=" -Wno-dev --no-warn-unused-cli"
9+
if [ "$cuda_image" = true ]; then
10+
cmake_args="$cmake_args -DFORCE_CUDA=1"
11+
fi
612

713
du -sh "$ccache_dir" && ccache -s &&
8-
colcon build --cmake-args \
9-
" -Wno-dev" \
10-
" --no-warn-unused-cli" \
14+
colcon build --cmake-args "$cmake_args" \
1115
--merge-install \
1216
--install-base "$install_base" \
1317
--mixin release compile-commands ccache &&

0 commit comments

Comments
 (0)