diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 65f8a74dafb..6ca62218712 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -101,7 +101,7 @@ runs: bake-target: docker-metadata-action-base flavor: | latest=false - suffix=-base + suffix=-base${{ inputs.tag-suffix }} - name: Docker meta for autoware-core id: meta-autoware-core diff --git a/ansible/playbooks/openadkit.yaml b/ansible/playbooks/openadkit.yaml index 46a8757229f..5cfa0408d58 100644 --- a/ansible/playbooks/openadkit.yaml +++ b/ansible/playbooks/openadkit.yaml @@ -26,16 +26,16 @@ when: module == 'base' - role: autoware.dev_env.pacmod when: module == 'base' + - role: autoware.dev_env.cuda + when: module == 'base' and prompt_install_nvidia=='y' + - role: autoware.dev_env.tensorrt + when: module == 'base' and prompt_install_nvidia=='y' - role: autoware.dev_env.build_tools when: module == 'all' and install_devel=='y' # Module specific dependencies - role: autoware.dev_env.geographiclib when: module == 'perception-localization' or module == 'all' - - role: autoware.dev_env.cuda - when: (module == 'perception-localization' or module == 'all') and prompt_install_nvidia=='y' - - role: autoware.dev_env.tensorrt - when: (module == 'perception-localization' or module == 'all') and prompt_install_nvidia=='y' # Development environment - role: autoware.dev_env.dev_tools diff --git a/ansible/roles/artifacts/tasks/main.yaml b/ansible/roles/artifacts/tasks/main.yaml index 3356431e370..c46bf3aed2f 100644 --- a/ansible/roles/artifacts/tasks/main.yaml +++ b/ansible/roles/artifacts/tasks/main.yaml @@ -174,13 +174,13 @@ mode: "644" checksum: sha256:ad66a061d61449af671bd0d14c2c407f0d749753f17f3165287857f686c4fd1a -- name: Download lidar_transfusion/transfusion.param.yaml +- name: Download lidar_transfusion/transfusion_ml_package.param.yaml become: true ansible.builtin.get_url: - url: https://awf.ml.dev.web.auto/perception/models/transfusion/t4xx1_90m/v2/transfusion.param.yaml - dest: "{{ data_dir }}/lidar_transfusion/transfusion.param.yaml" + url: https://awf.ml.dev.web.auto/perception/models/transfusion/t4xx1_90m/v2/transfusion_ml_package.param.yaml + dest: "{{ data_dir }}/lidar_transfusion/transfusion_ml_package.param.yaml" mode: "644" - checksum: sha256:fdd8dd21b7c1c0f9a15119fa6a79565f927ce8f6bac4ddf095cb7e27672cb3d8 + checksum: sha256:476f7727adc17a823962f2e09ba23d40f3116c50be48361d98179d054cd131b6 - name: Download lidar_transfusion/detection_class_remapper.param.yaml become: true diff --git a/docker/Dockerfile b/docker/Dockerfile index f6c7153e2a0..37546ea600f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,6 +4,7 @@ ARG BASE_IMAGE FROM $BASE_IMAGE AS base SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO +ARG SETUP_ARGS # Install apt packages and add GitHub to known hosts for private repositories RUN rm -f /etc/apt/apt.conf.d/docker-clean \ @@ -24,7 +25,7 @@ WORKDIR /autoware # Set up base environment RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module base --runtime openadkit \ + ./setup-dev-env.sh -y --module base ${SETUP_ARGS} --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache \ && echo "source /opt/ros/${ROS_DISTRO}/setup.bash" > /etc/bash.bashrc @@ -58,6 +59,18 @@ RUN rosdep update && rosdep keys --ignore-src --from-paths src \ | sort \ > /rosdep-core-depend-packages.txt \ && cat /rosdep-core-depend-packages.txt +COPY src/universe/external /autoware/src/universe/external +COPY src/universe/autoware.universe/common /autoware/src/universe/autoware.universe/common +# TODO(youtalk): Remove COPYs when https://github.com/autowarefoundation/autoware.universe/issues/8695 is resolved +COPY src/universe/autoware.universe/simulator/dummy_perception_publisher /autoware/src/universe/autoware.universe/simulator/dummy_perception_publisher +COPY src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils /autoware/src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils +RUN rosdep keys --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-common-depend-packages.txt \ + && cat /rosdep-universe-common-depend-packages.txt COPY src/launcher /autoware/src/launcher COPY src/param /autoware/src/param COPY src/sensor_component /autoware/src/sensor_component @@ -82,13 +95,12 @@ RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ FROM base AS autoware-core SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO -ARG SETUP_ARGS ENV CCACHE_DIR="/root/.ccache" # Set up development environment RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadkit \ + ./setup-dev-env.sh -y --module all openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -113,10 +125,41 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \ && du -sh ${CCACHE_DIR} && ccache -s \ && rm -rf /autoware/build -FROM autoware-core AS autoware-universe +FROM autoware-core AS autoware-universe-common +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Install rosdep dependencies +COPY --from=rosdep-depend /rosdep-universe-common-depend-packages.txt /tmp/rosdep-universe-common-depend-packages.txt +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + apt-get update \ + && cat /tmp/rosdep-universe-common-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# TODO(youtalk): Remove COPYs when https://github.com/autowarefoundation/autoware.universe/issues/8695 is resolved +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/common,target=/autoware/src/universe/autoware.universe/common \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/simulator/dummy_perception_publisher,target=/autoware/src/universe/autoware.universe/simulator/dummy_perception_publisher \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils,target=/autoware/src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/external,target=/autoware/src/universe/external \ + source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && colcon build --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ + --mixin release compile-commands ccache \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build + +FROM autoware-universe-common AS autoware-universe SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO -ARG SETUP_ARGS ENV CCACHE_DIR="/root/.ccache" # Install rosdep dependencies @@ -127,14 +170,24 @@ RUN --mount=type=ssh \ && cat /tmp/rosdep-universe-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache -# Build Autoware # hadolint ignore=SC1091 RUN --mount=type=cache,target=${CCACHE_DIR} \ --mount=type=bind,from=rosdep-depend,source=/autoware/src/launcher,target=/autoware/src/launcher \ --mount=type=bind,from=rosdep-depend,source=/autoware/src/param,target=/autoware/src/param \ --mount=type=bind,from=rosdep-depend,source=/autoware/src/sensor_component,target=/autoware/src/sensor_component \ --mount=type=bind,from=rosdep-depend,source=/autoware/src/sensor_kit,target=/autoware/src/sensor_kit \ - --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe,target=/autoware/src/universe \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/control,target=/autoware/src/universe/autoware.universe/control \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/evaluator,target=/autoware/src/universe/autoware.universe/evaluator \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/launch,target=/autoware/src/universe/autoware.universe/launch \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/localization,target=/autoware/src/universe/autoware.universe/localization \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/map,target=/autoware/src/universe/autoware.universe/map \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/perception,target=/autoware/src/universe/autoware.universe/perception \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/planning,target=/autoware/src/universe/autoware.universe/planning \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/sensing,target=/autoware/src/universe/autoware.universe/sensing \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/simulator,target=/autoware/src/universe/autoware.universe/simulator \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/system,target=/autoware/src/universe/autoware.universe/system \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/tools,target=/autoware/src/universe/autoware.universe/tools \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/vehicle,target=/autoware/src/universe/autoware.universe/vehicle \ --mount=type=bind,from=rosdep-depend,source=/autoware/src/vehicle,target=/autoware/src/vehicle \ source /opt/ros/"$ROS_DISTRO"/setup.bash \ && source /opt/autoware/setup.bash \