From d1bb10140f7595ecae4c02027b478446a5d2e153 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 10:45:34 +0900 Subject: [PATCH 1/7] add base-cuda Signed-off-by: Yutaka Kondo --- docker/Dockerfile | 78 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 20 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 19bb14cf97d..a85b0e0a52f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,6 +35,17 @@ RUN chmod +x /ros_entrypoint.sh ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] +FROM base AS base-cuda +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Set up CUDA runtime environment and artifacts +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + ./setup-dev-env.sh -y --module base --download-artifacts --no-cuda-drivers --runtime openadkit \ + && pip uninstall -y ansible ansible-core \ + && apt-get autoremove -y && rm -rf "$HOME"/.cache + # hadolint ignore=DL3006 FROM $BASE_IMAGE AS rosdep-depend SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -258,6 +269,20 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \ ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] +FROM universe-common-devel AS universe-common-devel-cuda +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Set up CUDA development environment +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + ./setup-dev-env.sh -y --module all --no-cuda-drivers --runtime openadkit \ + && pip uninstall -y ansible ansible-core \ + && apt-get autoremove -y && rm -rf "$HOME"/.cache + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + FROM universe-common-devel AS universe-sensing-perception-devel SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO @@ -290,17 +315,18 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \ ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] -FROM universe-sensing-perception-devel AS universe-sensing-perception-devel-cuda +FROM universe-common-devel-cuda AS universe-sensing-perception-devel-cuda SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ENV CCACHE_DIR="/root/.ccache" -# Set up CUDA development environment +# Install rosdep dependencies +COPY --from=rosdep-universe-sensing-perception-depend /rosdep-universe-sensing-perception-depend-packages.txt /tmp/rosdep-universe-sensing-perception-depend-packages.txt +# hadolint ignore=SC2002 RUN --mount=type=ssh \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module all --no-cuda-drivers openadkit \ - && pip uninstall -y ansible ansible-core \ - && apt-get autoremove -y && rm -rf "$HOME"/.cache + apt-get update \ + && cat /tmp/rosdep-universe-sensing-perception-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 # hadolint ignore=SC1091 RUN --mount=type=cache,target=${CCACHE_DIR} \ @@ -328,6 +354,8 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \ && du -sh ${CCACHE_DIR} && ccache -s \ && rm -rf /autoware/build +COPY --from=universe-sensing-perception-devel /opt/autoware /opt/autoware + ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] @@ -474,17 +502,19 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \ ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] -FROM universe-devel AS universe-devel-cuda +FROM universe-common-devel-cuda AS universe-devel-cuda SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# Set up CUDA development environment +# Install rosdep dependencies +COPY --from=rosdep-universe-depend /rosdep-universe-depend-packages.txt /tmp/rosdep-universe-depend-packages.txt +# hadolint ignore=SC2002 RUN --mount=type=ssh \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module all --no-cuda-drivers openadkit \ - && pip uninstall -y ansible ansible-core \ - && apt-get autoremove -y && rm -rf "$HOME"/.cache + apt-get update \ + && 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 COPY --from=universe-sensing-perception-devel-cuda /opt/autoware /opt/autoware +COPY --from=universe-devel /opt/autoware /opt/autoware ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] @@ -508,7 +538,8 @@ RUN --mount=type=ssh \ && find / -name "*.o" -type f -delete \ && find / -name "*.h" -type f -delete \ && find / -name "*.hpp" -type f -delete \ - && rm -rf /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ + && rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \ + /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \ /usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm* @@ -521,17 +552,20 @@ RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] -FROM universe-sensing-perception AS universe-sensing-perception-cuda +FROM base-cuda AS universe-sensing-perception-cuda SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR -# Set up CUDA runtime environment and artifacts +# Set up runtime environment +COPY --from=rosdep-universe-sensing-perception-depend /rosdep-universe-sensing-perception-exec-depend-packages.txt /tmp/rosdep-universe-sensing-perception-exec-depend-packages.txt # hadolint ignore=SC2002 RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module all --download-artifacts --no-cuda-drivers --runtime openadkit \ + ./setup-dev-env.sh -y --module all --no-nvidia --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ + && apt-get update \ + && cat /tmp/rosdep-universe-sensing-perception-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ && apt-get autoremove -y && rm -rf "$HOME"/.cache \ && find /usr/lib/$LIB_DIR-linux-gnu -name "*.a" -type f -delete \ && find / -name "*.o" -type f -delete \ @@ -665,7 +699,8 @@ RUN --mount=type=ssh \ && find / -name "*.o" -type f -delete \ && find / -name "*.h" -type f -delete \ && find / -name "*.hpp" -type f -delete \ - && rm -rf /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ + && rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \ + /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \ /usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm* @@ -678,17 +713,20 @@ RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] -FROM universe AS universe-cuda +FROM base-cuda AS universe-cuda SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR -# Set up CUDA runtime environment and artifacts +# Set up runtime environment +COPY --from=rosdep-universe-depend /rosdep-exec-depend-packages.txt /tmp/rosdep-exec-depend-packages.txt # hadolint ignore=SC2002 RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module all --download-artifacts --no-cuda-drivers --runtime openadkit \ + ./setup-dev-env.sh -y --module all --no-nvidia --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ + && apt-get update \ + && cat /tmp/rosdep-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ && apt-get autoremove -y && rm -rf "$HOME"/.cache \ && find /usr/lib/$LIB_DIR-linux-gnu -name "*.a" -type f -delete \ && find / -name "*.o" -type f -delete \ From 4f5d25532282a582e7aa37a3bd47fc47aa58ac96 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 10:47:23 +0900 Subject: [PATCH 2/7] update svg Signed-off-by: Yutaka Kondo --- docker/Dockerfile.svg | 704 +++++++++++++++++++++++------------------- 1 file changed, 380 insertions(+), 324 deletions(-) diff --git a/docker/Dockerfile.svg b/docker/Dockerfile.svg index 5d983ab1436..7ad00076c97 100644 --- a/docker/Dockerfile.svg +++ b/docker/Dockerfile.svg @@ -4,482 +4,538 @@ - - + + G - + cluster_legend - + key -FROM ...  -COPY --from=...  -RUN --mount=(.*)from=...  +FROM ...  +COPY --from=...  +RUN --mount=(.*)from=...  key2 -  -  -  +  +  +  key:e->key2:w - - + + key:e->key2:w - - + + key:e->key2:w - - + + external_image_0 - -$BASE_IMAGE + +$BASE_IMAGE stage_0 - -base + +base external_image_0->stage_0 - - + + - + -stage_1 - -rosdep-depend +stage_2 + +rosdep-depend - + -external_image_0->stage_1 - - +external_image_0->stage_2 + + - + -stage_7 - -core-devel +stage_1 + +base-cuda - + -stage_0->stage_7 - - +stage_0->stage_1 + + - + -stage_16 - -universe-sensing-perception +stage_8 + +core-devel - + -stage_0->stage_16 - - +stage_0->stage_8 + + stage_18 - -universe-localization-mapping + +universe-sensing-perception stage_0->stage_18 - - - - - -stage_19 - -universe-planning-control - - - -stage_0->stage_19 - - + + + - + stage_20 - -universe-vehicle-system + +universe-localization-mapping - + stage_0->stage_20 - - + - + stage_21 - -universe + +universe-planning-control - + stage_0->stage_21 - - - - - + + - - -stage_1->stage_7 - - + + +stage_22 + +universe-vehicle-system - + + +stage_0->stage_22 + + + + -stage_2 - -rosdep-universe-sensing-perception-depend +stage_23 + +universe - + -stage_1->stage_2 - - +stage_0->stage_23 + + + + + + +stage_2->stage_8 + + - + stage_3 - -rosdep-universe-localization-mapping-depend + +rosdep-universe-sensing-perception-depend - - -stage_1->stage_3 - - - + + +stage_2->stage_3 + + - + stage_4 - -rosdep-universe-planning-control-depend + +rosdep-universe-localization-mapping-depend - - -stage_1->stage_4 - - + + +stage_2->stage_4 + + - + stage_5 - -rosdep-universe-vehicle-system-depend + +rosdep-universe-planning-control-depend - - -stage_1->stage_5 - - + + +stage_2->stage_5 + + - + stage_6 - -rosdep-universe-depend + +rosdep-universe-vehicle-system-depend - - -stage_1->stage_6 - - + + +stage_2->stage_6 + + - - -stage_8 - -universe-common-devel + + +stage_7 + +rosdep-universe-depend - + -stage_1->stage_8 - - - - - -stage_7->stage_8 - - - - - -stage_17 - -universe-sensing-perception-cuda - - - -stage_16->stage_17 - - - - - -stage_22 - -universe-cuda - - - -stage_21->stage_22 - - - - - -stage_2->stage_16 - - +stage_2->stage_7 + + + - + stage_9 - -universe-sensing-perception-devel + +universe-common-devel stage_2->stage_9 - - + + - - -stage_10 - -universe-sensing-perception-devel-cuda + + +stage_19 + +universe-sensing-perception-cuda - - -stage_2->stage_10 - - - + + +stage_1->stage_19 + + + + + +stage_24 + +universe-cuda + + + +stage_1->stage_24 + + + + + +stage_8->stage_9 + + stage_3->stage_18 - - + + + + + +stage_3->stage_19 + + - + stage_11 - -universe-localization-mapping-devel + +universe-sensing-perception-devel - + stage_3->stage_11 - - - - - -stage_4->stage_19 - - + + - + stage_12 - -universe-planning-control-devel - - - -stage_4->stage_12 - - - - - -stage_5->stage_20 - - + +universe-sensing-perception-devel-cuda + + + +stage_3->stage_12 + + + + + + +stage_4->stage_20 + + + - + stage_13 - -universe-vehicle-system-devel + +universe-localization-mapping-devel - - -stage_5->stage_13 - - + + +stage_4->stage_13 + + - - -stage_6->stage_21 - + + +stage_5->stage_21 + + - + stage_14 - -universe-devel + +universe-planning-control-devel + + + +stage_5->stage_14 + + + + + +stage_6->stage_22 + + + - - -stage_6->stage_14 - - + + +stage_15 + +universe-vehicle-system-devel - - -stage_8->stage_9 - - - - - -stage_8->stage_11 - - - - - -stage_8->stage_12 - - - - - -stage_8->stage_13 - - + + +stage_6->stage_15 + + - + -stage_8->stage_14 - - +stage_7->stage_23 + + - - -stage_9->stage_16 - - - - + -stage_9->stage_10 - - +stage_7->stage_24 + + + - - -stage_9->stage_14 - - + + +stage_16 + +universe-devel - - -stage_15 - -universe-devel-cuda + + +stage_7->stage_16 + + - + + +stage_17 + +universe-devel-cuda + + + +stage_7->stage_17 + + + + -stage_10->stage_15 - - +stage_9->stage_11 + + - + -stage_10->stage_17 - - +stage_9->stage_13 + + - + + +stage_9->stage_14 + + + + +stage_9->stage_15 + + + + + +stage_9->stage_16 + + + + + +stage_10 + +universe-common-devel-cuda + + + +stage_9->stage_10 + + + + + stage_11->stage_18 - - + + - - -stage_11->stage_14 - - + + +stage_11->stage_12 + + + + + +stage_11->stage_16 + + - + stage_12->stage_19 - - + + - - -stage_12->stage_14 - - + + +stage_12->stage_17 + + - + stage_13->stage_20 - - + + - - -stage_13->stage_14 - - + + +stage_13->stage_16 + + - + stage_14->stage_21 - - + + - - -stage_14->stage_15 - - + + +stage_14->stage_16 + + - + stage_15->stage_22 - - + + + + + +stage_15->stage_16 + + + + + +stage_16->stage_23 + + + + + +stage_16->stage_17 + + + + + +stage_17->stage_24 + + + + + +stage_10->stage_12 + + + + + +stage_10->stage_17 + + From de2f8c7a72cfa0a3a22e188ad867e654ddfc7420 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 11:44:27 +0900 Subject: [PATCH 3/7] not cache cuda packages Signed-off-by: Yutaka Kondo --- docker/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index a85b0e0a52f..e5025e5d38a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -41,7 +41,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Set up CUDA runtime environment and artifacts # hadolint ignore=SC2002 RUN --mount=type=ssh \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ ./setup-dev-env.sh -y --module base --download-artifacts --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -275,7 +274,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Set up CUDA development environment # hadolint ignore=SC2002 RUN --mount=type=ssh \ - --mount=type=cache,target=/var/cache/apt,sharing=locked \ ./setup-dev-env.sh -y --module all --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache From 75109fbfe3a185567b90e69e4ca44da390968db9 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 14:58:47 +0900 Subject: [PATCH 4/7] push base-cuda image Signed-off-by: Yutaka Kondo --- .../actions/docker-build-and-push-cuda/action.yaml | 13 +++++++++++++ docker/docker-bake-cuda.hcl | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/.github/actions/docker-build-and-push-cuda/action.yaml b/.github/actions/docker-build-and-push-cuda/action.yaml index 59f5ccc3569..3c6e111ab8b 100644 --- a/.github/actions/docker-build-and-push-cuda/action.yaml +++ b/.github/actions/docker-build-and-push-cuda/action.yaml @@ -51,6 +51,18 @@ runs: run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT shell: bash + - name: Docker meta for autoware:base-cuda + id: meta-base-cuda + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=base-cuda-${{ inputs.platform }} + type=raw,value=base-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-base-cuda + flavor: | + latest=false + - name: Docker meta for autoware:universe-sensing-perception-devel-cuda id: meta-universe-sensing-perception-devel-cuda uses: docker/metadata-action@v5 @@ -112,6 +124,7 @@ runs: push: true files: | docker/docker-bake-cuda.hcl + ${{ steps.meta-base-cuda.outputs.bake-file }} ${{ steps.meta-universe-sensing-perception-devel-cuda.outputs.bake-file }} ${{ steps.meta-universe-sensing-perception-cuda.outputs.bake-file }} ${{ steps.meta-universe-devel-cuda.outputs.bake-file }} diff --git a/docker/docker-bake-cuda.hcl b/docker/docker-bake-cuda.hcl index 87aa27df879..44ec1142178 100644 --- a/docker/docker-bake-cuda.hcl +++ b/docker/docker-bake-cuda.hcl @@ -1,5 +1,6 @@ group "default" { targets = [ + "base-cuda", "universe-sensing-perception-devel-cuda", "universe-sensing-perception-cuda", "universe-devel-cuda", @@ -8,11 +9,18 @@ group "default" { } // For docker/metadata-action +target "docker-metadata-action-base-cuda" {} target "docker-metadata-action-universe-sensing-perception-devel-cuda" {} target "docker-metadata-action-universe-sensing-perception-cuda" {} target "docker-metadata-action-universe-devel-cuda" {} target "docker-metadata-action-universe-cuda" {} +target "base-cuda" { + inherits = ["docker-metadata-action-base-cuda"] + dockerfile = "docker/Dockerfile" + target = "base-cuda" +} + target "universe-sensing-perception-devel-cuda" { inherits = ["docker-metadata-action-universe-sensing-perception-devel-cuda"] dockerfile = "docker/Dockerfile" From 223f85227a787929c9dc1934398ff6bc7980806d Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 17:51:26 +0900 Subject: [PATCH 5/7] Update docker-build-and-push.yaml --- .github/workflows/docker-build-and-push.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index 232b78c6569..b4ebed24f05 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -56,6 +56,9 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }},mode=max + - name: Free disk space + uses: ./.github/actions/free-disk-space + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || From fe2a215138b0098d604b933fc3997693c32efeb3 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 17:52:17 +0900 Subject: [PATCH 6/7] Update docker-build-and-push-arm64.yaml --- .github/workflows/docker-build-and-push-arm64.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 01d6be45f59..9e5895238a0 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -61,6 +61,9 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max + - name: Free disk space + uses: ./.github/actions/free-disk-space + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || From a7ec23d9b56effce18d119c49bd08dca0f6af388 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 19:56:58 +0900 Subject: [PATCH 7/7] separate jobs Signed-off-by: Yutaka Kondo --- .../docker-build-and-push-cuda/action.yaml | 13 ++++++++ .../docker-build-and-push-arm64.yaml | 30 +++++++++++++++++++ .github/workflows/docker-build-and-push.yaml | 30 +++++++++++++++++++ 3 files changed, 73 insertions(+) diff --git a/.github/actions/docker-build-and-push-cuda/action.yaml b/.github/actions/docker-build-and-push-cuda/action.yaml index 3c6e111ab8b..cd992b5d6c2 100644 --- a/.github/actions/docker-build-and-push-cuda/action.yaml +++ b/.github/actions/docker-build-and-push-cuda/action.yaml @@ -15,6 +15,19 @@ inputs: runs: using: composite steps: + - name: Install jq and vcstool + run: | + sudo apt-get -y update + sudo apt-get -y install jq python3-pip + pip install --no-cache-dir vcstool + shell: bash + + - name: Run vcs import + run: | + mkdir src + vcs import src < autoware.repos + shell: bash + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 9e5895238a0..88b6dfea6e4 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -61,9 +61,39 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max + - name: Show disk space + if: always() + run: | + df -h + + docker-build-and-push-cuda: + needs: [load-env, docker-build-and-push] + runs-on: [self-hosted, linux, ARM64] + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set git config + uses: autowarefoundation/autoware-github-actions/set-git-config@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Free disk space uses: ./.github/actions/free-disk-space + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + *.env + *.repos + .github/actions/docker-build-and-push/action.yaml + .github/workflows/docker-build-and-push*.yaml + ansible-galaxy-requirements.yaml + ansible/** + docker/** + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index b4ebed24f05..e5afd8e3b03 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -56,9 +56,39 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }},mode=max + - name: Show disk space + if: always() + run: | + df -h + + docker-build-and-push-cuda: + needs: [load-env, docker-build-and-push] + runs-on: ubuntu-22.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set git config + uses: autowarefoundation/autoware-github-actions/set-git-config@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Free disk space uses: ./.github/actions/free-disk-space + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + *.env + *.repos + .github/actions/docker-build-and-push/action.yaml + .github/workflows/docker-build-and-push*.yaml + ansible-galaxy-requirements.yaml + ansible/** + docker/** + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' ||