From d63ab93fba296f8150e793cd3cbed799cdde30b3 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Wed, 23 Oct 2024 22:57:33 +0900 Subject: [PATCH] fix rebase Signed-off-by: Yutaka Kondo --- .../docker-build-and-push-cuda/action.yaml | 123 ------------------ .../actions/docker-build-and-push/action.yaml | 18 +-- .github/workflows/health-check.yaml | 2 +- docker/docker-bake-cuda.hcl | 38 ------ docker/docker-bake.hcl | 34 ++++- 5 files changed, 39 insertions(+), 176 deletions(-) delete mode 100644 .github/actions/docker-build-and-push-cuda/action.yaml delete mode 100644 docker/docker-bake-cuda.hcl diff --git a/.github/actions/docker-build-and-push-cuda/action.yaml b/.github/actions/docker-build-and-push-cuda/action.yaml deleted file mode 100644 index 35419e96d0..0000000000 --- a/.github/actions/docker-build-and-push-cuda/action.yaml +++ /dev/null @@ -1,123 +0,0 @@ -name: docker-build-and-push -description: "" - -inputs: - platform: - description: "" - required: true - bake-target: - description: "" - required: true - build-args: - description: "" - required: false - dockerhub-token: - description: "" - required: true - -runs: - using: composite - steps: - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Restore ccache - uses: actions/cache/restore@v4 - with: - path: | - root-ccache - key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }} - restore-keys: | - ccache-${{ inputs.platform }}- - - - name: Restore apt-get - uses: actions/cache/restore@v4 - with: - path: | - var-cache-apt - key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }} - restore-keys: | - apt-get-${{ inputs.platform }}- - - - name: Inject cache into docker - uses: reproducible-containers/buildkit-cache-dance@v3.1.2 - with: - cache-map: | - { - "root-ccache": "/root/.ccache", - "var-cache-apt": "/var/cache/apt" - } - skip-extraction: true - - - name: Get current date - id: date - run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - shell: bash - - - name: Docker meta for autoware:universe-sensing-perception-devel-cuda - id: meta-universe-sensing-perception-devel-cuda - uses: docker/metadata-action@v5 - with: - images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: | - type=raw,value=universe-sensing-perception-devel-cuda-${{ inputs.platform }} - type=raw,value=universe-sensing-perception-devel-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} - bake-target: docker-metadata-action-universe-sensing-perception-devel-cuda - flavor: | - latest=false - - - name: Docker meta for autoware:universe-sensing-perception-cuda - id: meta-universe-sensing-perception-cuda - uses: docker/metadata-action@v5 - with: - images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: | - type=raw,value=universe-sensing-perception-cuda-${{ inputs.platform }} - type=raw,value=universe-sensing-perception-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} - bake-target: docker-metadata-action-universe-sensing-perception-cuda - flavor: | - latest=false - - - name: Docker meta for autoware:universe-devel-cuda - id: meta-universe-devel-cuda - uses: docker/metadata-action@v5 - with: - images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: | - type=raw,value=universe-devel-cuda-${{ inputs.platform }} - type=raw,value=universe-devel-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} - bake-target: docker-metadata-action-universe-devel-cuda - flavor: | - latest=false - - - name: Docker meta for autoware:universe-cuda - id: meta-universe-cuda - uses: docker/metadata-action@v5 - with: - images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: | - type=raw,value=universe-cuda-${{ inputs.platform }} - type=raw,value=universe-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} - bake-target: docker-metadata-action-universe-cuda - flavor: | - latest=auto - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ github.repository_owner }} - password: ${{ inputs.dockerhub-token }} - - - name: Build and Push to GitHub Container Registry - uses: docker/bake-action@v5 - with: - push: true - files: | - docker/docker-bake-cuda.hcl - ${{ 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 }} - ${{ steps.meta-universe-cuda.outputs.bake-file }} - provenance: false - set: | - ${{ inputs.build-args }} diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 5c91734319..a1dbe18e6f 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -100,7 +100,6 @@ runs: flavor: | latest=false -<<<<<<< HEAD - name: Docker meta for autoware:universe-sensing-perception-devel-cuda id: meta-universe-sensing-perception-devel-cuda uses: docker/metadata-action@v5 @@ -113,8 +112,6 @@ runs: flavor: | latest=false -======= ->>>>>>> 3f6461b (Revert "integrate") - name: Docker meta for autoware:universe-sensing-perception id: meta-universe-sensing-perception uses: docker/metadata-action@v5 @@ -127,7 +124,6 @@ runs: flavor: | latest=false -<<<<<<< HEAD - name: Docker meta for autoware:universe-sensing-perception-cuda id: meta-universe-sensing-perception-cuda uses: docker/metadata-action@v5 @@ -140,8 +136,6 @@ runs: flavor: | latest=false -======= ->>>>>>> 3f6461b (Revert "integrate") - name: Docker meta for autoware:universe-localization-mapping-devel id: meta-universe-localization-mapping-devel uses: docker/metadata-action@v5 @@ -226,7 +220,6 @@ runs: flavor: | latest=false -<<<<<<< HEAD - name: Docker meta for autoware:universe-devel-cuda id: meta-universe-devel-cuda uses: docker/metadata-action@v5 @@ -239,8 +232,6 @@ runs: flavor: | latest=false -======= ->>>>>>> 3f6461b (Revert "integrate") - name: Docker meta for autoware:universe id: meta-universe uses: docker/metadata-action@v5 @@ -253,7 +244,6 @@ runs: flavor: | latest=auto -<<<<<<< HEAD - name: Docker meta for autoware:universe-cuda id: meta-universe-cuda uses: docker/metadata-action@v5 @@ -266,9 +256,7 @@ runs: flavor: | latest=auto -======= ->>>>>>> 3f6461b (Revert "integrate") - - name: Login to Docker Hub + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io @@ -284,7 +272,9 @@ runs: ${{ steps.meta-base.outputs.bake-file }} ${{ steps.meta-core-devel.outputs.bake-file }} ${{ steps.meta-universe-sensing-perception-devel.outputs.bake-file }} + ${{ steps.meta-universe-sensing-perception-devel-cuda.outputs.bake-file }} ${{ steps.meta-universe-sensing-perception.outputs.bake-file }} + ${{ steps.meta-universe-sensing-perception-cuda.outputs.bake-file }} ${{ steps.meta-universe-localization-mapping-devel.outputs.bake-file }} ${{ steps.meta-universe-localization-mapping.outputs.bake-file }} ${{ steps.meta-universe-planning-control-devel.outputs.bake-file }} @@ -292,7 +282,9 @@ runs: ${{ steps.meta-universe-vehicle-system-devel.outputs.bake-file }} ${{ steps.meta-universe-vehicle-system.outputs.bake-file }} ${{ steps.meta-universe-devel.outputs.bake-file }} + ${{ steps.meta-universe-devel-cuda.outputs.bake-file }} ${{ steps.meta-universe.outputs.bake-file }} + ${{ steps.meta-universe-cuda.outputs.bake-file }} provenance: false set: | ${{ inputs.build-args }} diff --git a/.github/workflows/health-check.yaml b/.github/workflows/health-check.yaml index b7df60fac9..55894881a4 100644 --- a/.github/workflows/health-check.yaml +++ b/.github/workflows/health-check.yaml @@ -26,7 +26,7 @@ jobs: docker-build: needs: load-env - runs-on: buildjet-16vcpu-ubuntu-2204 + runs-on: ubuntu-22.04 strategy: fail-fast: false steps: diff --git a/docker/docker-bake-cuda.hcl b/docker/docker-bake-cuda.hcl deleted file mode 100644 index 87aa27df87..0000000000 --- a/docker/docker-bake-cuda.hcl +++ /dev/null @@ -1,38 +0,0 @@ -group "default" { - targets = [ - "universe-sensing-perception-devel-cuda", - "universe-sensing-perception-cuda", - "universe-devel-cuda", - "universe-cuda" - ] -} - -// For docker/metadata-action -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 "universe-sensing-perception-devel-cuda" { - inherits = ["docker-metadata-action-universe-sensing-perception-devel-cuda"] - dockerfile = "docker/Dockerfile" - target = "universe-sensing-perception-devel-cuda" -} - -target "universe-sensing-perception-cuda" { - inherits = ["docker-metadata-action-universe-sensing-perception-cuda"] - dockerfile = "docker/Dockerfile" - target = "universe-sensing-perception-cuda" -} - -target "universe-devel-cuda" { - inherits = ["docker-metadata-action-universe-devel-cuda"] - dockerfile = "docker/Dockerfile" - target = "universe-devel-cuda" -} - -target "universe-cuda" { - inherits = ["docker-metadata-action-universe-cuda"] - dockerfile = "docker/Dockerfile" - target = "universe-cuda" -} diff --git a/docker/docker-bake.hcl b/docker/docker-bake.hcl index 35d0f7fdbf..445c26a349 100644 --- a/docker/docker-bake.hcl +++ b/docker/docker-bake.hcl @@ -3,7 +3,9 @@ group "default" { "base", "core-devel", "universe-sensing-perception-devel", + "universe-sensing-perception-devel-cuda", "universe-sensing-perception", + "universe-sensing-perception-cuda", "universe-localization-mapping-devel", "universe-localization-mapping", "universe-planning-control-devel", @@ -11,7 +13,9 @@ group "default" { "universe-vehicle-system-devel", "universe-vehicle-system", "universe-devel", - "universe" + "universe-devel-cuda", + "universe", + "universe-cuda" ] } @@ -19,7 +23,9 @@ group "default" { target "docker-metadata-action-base" {} target "docker-metadata-action-core-devel" {} target "docker-metadata-action-universe-sensing-perception-devel" {} +target "docker-metadata-action-universe-sensing-perception-devel-cuda" {} target "docker-metadata-action-universe-sensing-perception" {} +target "docker-metadata-action-universe-sensing-perception-cuda" {} target "docker-metadata-action-universe-localization-mapping-devel" {} target "docker-metadata-action-universe-localization-mapping" {} target "docker-metadata-action-universe-planning-control-devel" {} @@ -27,7 +33,9 @@ target "docker-metadata-action-universe-planning-control" {} target "docker-metadata-action-universe-vehicle-system-devel" {} target "docker-metadata-action-universe-vehicle-system" {} target "docker-metadata-action-universe-devel" {} +target "docker-metadata-action-universe-devel-cuda" {} target "docker-metadata-action-universe" {} +target "docker-metadata-action-universe-cuda" {} target "base" { inherits = ["docker-metadata-action-base"] @@ -47,12 +55,24 @@ target "universe-sensing-perception-devel" { target = "universe-sensing-perception-devel" } +target "universe-sensing-perception-devel-cuda" { + inherits = ["docker-metadata-action-universe-sensing-perception-devel-cuda"] + dockerfile = "docker/Dockerfile" + target = "universe-sensing-perception-devel-cuda" +} + target "universe-sensing-perception" { inherits = ["docker-metadata-action-universe-sensing-perception"] dockerfile = "docker/Dockerfile" target = "universe-sensing-perception" } +target "universe-sensing-perception-cuda" { + inherits = ["docker-metadata-action-universe-sensing-perception-cuda"] + dockerfile = "docker/Dockerfile" + target = "universe-sensing-perception-cuda" +} + target "universe-localization-mapping-devel" { inherits = ["docker-metadata-action-universe-localization-mapping-devel"] dockerfile = "docker/Dockerfile" @@ -95,8 +115,20 @@ target "universe-devel" { target = "universe-devel" } +target "universe-devel-cuda" { + inherits = ["docker-metadata-action-universe-devel-cuda"] + dockerfile = "docker/Dockerfile" + target = "universe-devel-cuda" +} + target "universe" { inherits = ["docker-metadata-action-universe"] dockerfile = "docker/Dockerfile" target = "universe" } + +target "universe-cuda" { + inherits = ["docker-metadata-action-universe-cuda"] + dockerfile = "docker/Dockerfile" + target = "universe-cuda" +}