diff --git a/.github/actions/docker-build-and-push-cuda/action.yaml b/.github/actions/docker-build-and-push-cuda/action.yaml new file mode 100644 index 00000000000..59f5ccc3569 --- /dev/null +++ b/.github/actions/docker-build-and-push-cuda/action.yaml @@ -0,0 +1,121 @@ +name: docker-build-and-push-cuda +description: Workflow do build and push CUDA images to registry. + +inputs: + platform: + description: "" + required: true + bake-target: + description: "" + required: true + build-args: + description: "" + required: false + +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: ghcr.io/${{ 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: ghcr.io/${{ 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: ghcr.io/${{ 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: ghcr.io/${{ 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 GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.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 728d52b9376..0a064ee1acf 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -2,9 +2,6 @@ name: docker-build-and-push description: "" inputs: - name: - description: "" - required: true platform: description: "" required: true @@ -14,9 +11,6 @@ inputs: build-args: description: "" required: false - tag-suffix: - description: "" - required: false runs: using: composite @@ -42,9 +36,8 @@ runs: with: path: | root-ccache - key: ccache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/*.cpp') }} + key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }} restore-keys: | - ccache-${{ inputs.platform }}-${{ inputs.name }}- ccache-${{ inputs.platform }}- - name: Restore apt-get @@ -52,9 +45,8 @@ runs: with: path: | var-cache-apt - key: apt-get-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/package.xml') }} + key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }} restore-keys: | - apt-get-${{ inputs.platform }}-${{ inputs.name }}- apt-get-${{ inputs.platform }}- - name: Inject cache into docker @@ -78,8 +70,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=base${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=base${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=base-${{ inputs.platform }} + type=raw,value=base-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-base flavor: | latest=false @@ -90,8 +82,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=core-devel-${{ inputs.platform }} + type=raw,value=core-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-core-devel flavor: | latest=false @@ -102,8 +94,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-sensing-perception-devel-${{ inputs.platform }} + type=raw,value=universe-sensing-perception-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-sensing-perception-devel flavor: | latest=false @@ -114,8 +106,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-sensing-perception-${{ inputs.platform }} + type=raw,value=universe-sensing-perception-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-sensing-perception flavor: | latest=false @@ -126,8 +118,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-localization-mapping-devel-${{ inputs.platform }} + type=raw,value=universe-localization-mapping-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-localization-mapping-devel flavor: | latest=false @@ -138,8 +130,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-localization-mapping-${{ inputs.platform }} + type=raw,value=universe-localization-mapping-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-localization-mapping flavor: | latest=false @@ -150,8 +142,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-planning-control-devel-${{ inputs.platform }} + type=raw,value=universe-planning-control-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-planning-control-devel flavor: | latest=false @@ -162,8 +154,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-planning-control-${{ inputs.platform }} + type=raw,value=universe-planning-control-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-planning-control flavor: | latest=false @@ -174,8 +166,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-vehicle-system-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-vehicle-system-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-vehicle-system-devel-${{ inputs.platform }} + type=raw,value=universe-vehicle-system-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-vehicle-system-devel flavor: | latest=false @@ -186,8 +178,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-vehicle-system${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-vehicle-system${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-vehicle-system-${{ inputs.platform }} + type=raw,value=universe-vehicle-system-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-vehicle-system flavor: | latest=false @@ -198,8 +190,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-devel-${{ inputs.platform }} + type=raw,value=universe-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe-devel flavor: | latest=false @@ -210,8 +202,8 @@ runs: with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: | - type=raw,value=universe${{ inputs.tag-suffix }}-${{ inputs.platform }} - type=raw,value=universe${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + type=raw,value=universe-${{ inputs.platform }} + type=raw,value=universe-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-universe flavor: | latest=auto diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index de582611886..bfb6383c208 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -2,9 +2,6 @@ name: docker-build description: "" inputs: - name: - description: "" - required: true platform: description: "" required: true @@ -36,48 +33,44 @@ runs: - name: Cache ccache uses: actions/cache@v4 - if: ${{ inputs.name == 'no-cuda' && github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' }} id: cache-ccache with: path: | root-ccache - key: ccache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/*.cpp') }} + key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }} restore-keys: | - ccache-${{ inputs.platform }}-${{ inputs.name }}- ccache-${{ inputs.platform }}- - name: Cache apt-get uses: actions/cache@v4 - if: ${{ inputs.name == 'no-cuda' && github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' }} id: cache-apt-get with: path: | var-cache-apt - key: apt-get-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/package.xml') }} + key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }} restore-keys: | - apt-get-${{ inputs.platform }}-${{ inputs.name }}- apt-get-${{ inputs.platform }}- - name: Restore ccache uses: actions/cache/restore@v4 - if: ${{ inputs.name != 'no-cuda' || github.ref != 'refs/heads/main' }} + if: ${{ github.ref != 'refs/heads/main' }} with: path: | root-ccache - key: ccache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/*.cpp') }} + key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }} restore-keys: | - ccache-${{ inputs.platform }}-${{ inputs.name }}- ccache-${{ inputs.platform }}- - name: Restore apt-get uses: actions/cache/restore@v4 - if: ${{ inputs.name != 'no-cuda' || github.ref != 'refs/heads/main' }} + if: ${{ github.ref != 'refs/heads/main' }} with: path: | var-cache-apt - key: apt-get-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/package.xml') }} + key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }} restore-keys: | - apt-get-${{ inputs.platform }}-${{ inputs.name }}- apt-get-${{ inputs.platform }}- - name: Inject cache into docker @@ -104,4 +97,4 @@ runs: context: . push: false build-args: ${{ inputs.build-args }} - cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ inputs.name }}-${{ inputs.platform }}-${{ inputs.cache-tag-suffix }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ inputs.platform }}-${{ inputs.cache-tag-suffix }} diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 75a51b48581..01d6be45f59 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -14,24 +14,6 @@ jobs: docker-build-and-push: needs: load-env runs-on: [self-hosted, linux, ARM64] - strategy: - fail-fast: false - matrix: - name: - - no-cuda - - cuda - include: - - name: no-cuda - platform: arm64 - base_image_env: base_image - lib_dir: aarch64 - setup-args: --no-nvidia - tag-suffix: "" - - name: cuda - platform: arm64 - base_image_env: base_image - lib_dir: aarch64 - tag-suffix: -cuda steps: # https://github.com/actions/checkout/issues/211 - name: Change permission of workspace @@ -62,25 +44,39 @@ jobs: ansible/** docker/** - - name: Build 'Autoware' + - name: Build 'Autoware' without CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref_type == 'tag') }} uses: ./.github/actions/docker-build-and-push with: - name: ${{ matrix.name }} - platform: ${{ matrix.platform }} + platform: arm64 bake-target: autoware build-args: | - *.platform=linux/${{ matrix.platform }} + *.platform=linux/arm64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} - *.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} - *.args.SETUP_ARGS=${{ matrix.setup-args }} - *.args.LIB_DIR=${{ matrix.lib_dir }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main - *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max - tag-suffix: ${{ matrix.tag-suffix }} + *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }} + *.args.LIB_DIR=aarch64 + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }} + *.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: Build 'Autoware' with CUDA + if: ${{ steps.changed-files.outputs.any_changed == 'true' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref_type == 'tag') }} + uses: ./.github/actions/docker-build-and-push-cuda + with: + platform: arm64 + bake-target: autoware + build-args: | + *.platform=linux/arm64 + *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} + *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }} + *.args.LIB_DIR=aarch64 + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }} + *.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() diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index d81db3f4a19..232b78c6569 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -14,24 +14,6 @@ jobs: docker-build-and-push: needs: load-env runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - name: - - no-cuda - - cuda - include: - - name: no-cuda - platform: amd64 - base_image_env: base_image - lib_dir: x86_64 - setup-args: --no-nvidia - tag-suffix: "" - - name: cuda - platform: amd64 - base_image_env: base_image - lib_dir: x86_64 - tag-suffix: -cuda steps: - name: Check out repository uses: actions/checkout@v4 @@ -57,25 +39,39 @@ jobs: ansible/** docker/** - - name: Build 'Autoware' + - name: Build 'Autoware' without CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref_type == 'tag') }} uses: ./.github/actions/docker-build-and-push with: - name: ${{ matrix.name }} - platform: ${{ matrix.platform }} + platform: amd64 bake-target: autoware build-args: | - *.platform=linux/${{ matrix.platform }} + *.platform=linux/amd64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} - *.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} - *.args.SETUP_ARGS=${{ matrix.setup-args }} - *.args.LIB_DIR=${{ matrix.lib_dir }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }} - *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main - *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max - tag-suffix: ${{ matrix.tag-suffix }} + *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }} + *.args.LIB_DIR=x86_64 + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }} + *.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: Build 'Autoware' with CUDA + if: ${{ steps.changed-files.outputs.any_changed == 'true' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref_type == 'tag') }} + uses: ./.github/actions/docker-build-and-push-cuda + with: + platform: amd64 + bake-target: autoware + build-args: | + *.platform=linux/amd64 + *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} + *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }} + *.args.LIB_DIR=x86_64 + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }} + *.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() diff --git a/.github/workflows/health-check-arm64.yaml b/.github/workflows/health-check-arm64.yaml index eca18a45bd3..d487e3c6ffd 100644 --- a/.github/workflows/health-check-arm64.yaml +++ b/.github/workflows/health-check-arm64.yaml @@ -12,22 +12,6 @@ jobs: docker-build: needs: load-env runs-on: [self-hosted, linux, ARM64] - strategy: - fail-fast: false - matrix: - name: - - no-cuda - - cuda - include: - - name: no-cuda - platform: arm64 - base_image_env: base_image - lib_dir: aarch64 - setup-args: --no-nvidia - - name: cuda - platform: arm64 - base_image_env: base_image - lib_dir: aarch64 steps: # https://github.com/actions/checkout/issues/211 - name: Change permission of workspace @@ -48,14 +32,12 @@ jobs: - name: Build 'Autoware' uses: ./.github/actions/docker-build with: - name: ${{ matrix.name }} - platform: ${{ matrix.platform }} + platform: arm64 cache-tag-suffix: main build-args: | ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} - BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} - SETUP_ARGS=${{ matrix.setup-args }} - LIB_DIR=${{ matrix.lib_dir }} + BASE_IMAGE=${{ needs.load-env.outputs.base_image }} + LIB_DIR=aarch64 - name: Show disk space if: always() diff --git a/.github/workflows/health-check.yaml b/.github/workflows/health-check.yaml index 9a54be6cb77..55894881a4d 100644 --- a/.github/workflows/health-check.yaml +++ b/.github/workflows/health-check.yaml @@ -29,20 +29,6 @@ jobs: runs-on: ubuntu-22.04 strategy: fail-fast: false - matrix: - name: - - no-cuda - - cuda - include: - - name: no-cuda - platform: amd64 - base_image_env: base_image - lib_dir: x86_64 - setup-args: --no-nvidia - - name: cuda - platform: amd64 - base_image_env: base_image - lib_dir: x86_64 steps: - name: Check out repository uses: actions/checkout@v4 @@ -58,14 +44,12 @@ jobs: - name: Build 'Autoware' uses: ./.github/actions/docker-build with: - name: ${{ matrix.name }} - platform: ${{ matrix.platform }} + platform: amd64 cache-tag-suffix: main build-args: | ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} - BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }} - SETUP_ARGS=${{ matrix.setup-args }} - LIB_DIR=${{ matrix.lib_dir }} + BASE_IMAGE=${{ needs.load-env.outputs.base_image }} + LIB_DIR=x86_64 - name: Show disk space if: always() diff --git a/docker/Dockerfile b/docker/Dockerfile index eda2e415942..19bb14cf97d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,7 +4,6 @@ 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 \ @@ -25,7 +24,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 ${SETUP_ARGS} --no-cuda-drivers --runtime openadkit \ + ./setup-dev-env.sh -y --module base --no-nvidia --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 @@ -193,13 +192,12 @@ RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ FROM base AS core-devel SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO -ARG SETUP_ARGS ENV CCACHE_DIR="/root/.ccache" # Set up development environment and tools 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 --no-nvidia --no-cuda-drivers openadkit \ && ./setup-dev-env.sh -y --module dev-tools openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -292,6 +290,47 @@ 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 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Set up CUDA development environment +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 + +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + # TODO(youtalk): Move CUDA related packages into a dedicated directory + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_bytetrack,target=/autoware/src/universe/autoware.universe/perception/autoware_bytetrack \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_lidar_apollo_instance_segmentation,target=/autoware/src/universe/autoware.universe/perception/autoware_lidar_apollo_instance_segmentation \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_lidar_centerpoint,target=/autoware/src/universe/autoware.universe/perception/autoware_lidar_centerpoint \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_lidar_transfusion,target=/autoware/src/universe/autoware.universe/perception/autoware_lidar_transfusion \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_shape_estimation,target=/autoware/src/universe/autoware.universe/perception/autoware_shape_estimation \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_classifier,target=/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_classifier \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common,target=/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_yolox,target=/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_yolox \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_traffic_light_classifier,target=/autoware/src/universe/autoware.universe/perception/autoware_traffic_light_classifier \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception/autoware_traffic_light_fine_detector,target=/autoware/src/universe/autoware.universe/perception/autoware_traffic_light_fine_detector \ + --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 \ + 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 + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + FROM universe-common-devel AS universe-localization-mapping-devel SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO @@ -435,18 +474,32 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \ ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] +FROM universe-devel AS universe-devel-cuda +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Set up CUDA development environment +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 + +COPY --from=universe-sensing-perception-devel-cuda /opt/autoware /opt/autoware + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + FROM base AS universe-sensing-perception SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR -ARG SETUP_ARGS -# Set up 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 ${SETUP_ARGS} --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 \ @@ -455,8 +508,7 @@ RUN --mount=type=ssh \ && find / -name "*.o" -type f -delete \ && find / -name "*.h" -type f -delete \ && find / -name "*.hpp" -type f -delete \ - && 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 \ + && rm -rf /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* @@ -469,18 +521,43 @@ 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 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ARG LIB_DIR + +# 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 all --download-artifacts --no-cuda-drivers --runtime openadkit \ + && pip uninstall -y ansible ansible-core \ + && 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 \ + && find / -name "*.h" -type f -delete \ + && find / -name "*.hpp" -type f -delete \ + && 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* + +COPY --from=universe-sensing-perception-devel-cuda /opt/autoware /opt/autoware + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + FROM base AS universe-localization-mapping SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR -ARG SETUP_ARGS -# Set up runtime environment and artifacts +# Set up runtime environment COPY --from=rosdep-universe-localization-mapping-depend /rosdep-universe-localization-mapping-exec-depend-packages.txt /tmp/rosdep-universe-localization-mapping-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 ${SETUP_ARGS} --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-localization-mapping-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ @@ -507,14 +584,13 @@ FROM base AS universe-planning-control SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR -ARG SETUP_ARGS -# Set up runtime environment and artifacts +# Set up runtime environment COPY --from=rosdep-universe-planning-control-depend /rosdep-universe-planning-control-exec-depend-packages.txt /tmp/rosdep-universe-planning-control-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 ${SETUP_ARGS} --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-planning-control-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ @@ -541,14 +617,13 @@ FROM base AS universe-vehicle-system SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR -ARG SETUP_ARGS -# Set up runtime environment and artifacts +# Set up runtime environment COPY --from=rosdep-universe-vehicle-system-depend /rosdep-universe-vehicle-system-exec-depend-packages.txt /tmp/rosdep-universe-vehicle-system-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 ${SETUP_ARGS} --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-vehicle-system-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ @@ -575,14 +650,13 @@ FROM base AS universe SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR -ARG SETUP_ARGS -# Set up 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 ${SETUP_ARGS} --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 \ @@ -591,8 +665,7 @@ RUN --mount=type=ssh \ && find / -name "*.o" -type f -delete \ && find / -name "*.h" -type f -delete \ && find / -name "*.hpp" -type f -delete \ - && 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 \ + && rm -rf /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* @@ -604,3 +677,29 @@ RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] + +FROM universe AS universe-cuda +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ARG LIB_DIR + +# 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 all --download-artifacts --no-cuda-drivers --runtime openadkit \ + && pip uninstall -y ansible ansible-core \ + && 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 \ + && find / -name "*.h" -type f -delete \ + && find / -name "*.hpp" -type f -delete \ + && 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* + +COPY --from=universe-devel-cuda /opt/autoware /opt/autoware + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] diff --git a/docker/Dockerfile.svg b/docker/Dockerfile.svg index a8d5d4e1d37..5d983ab1436 100644 --- a/docker/Dockerfile.svg +++ b/docker/Dockerfile.svg @@ -1,414 +1,485 @@ - - - + + 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 + +rosdep-depend external_image_0->stage_1 - - + + stage_7 - -core-devel + +core-devel stage_0->stage_7 - - + + - + -stage_14 - -universe-sensing-perception +stage_16 + +universe-sensing-perception - + -stage_0->stage_14 - - - +stage_0->stage_16 + + - + -stage_15 - -universe-localization-mapping +stage_18 + +universe-localization-mapping - + -stage_0->stage_15 - - +stage_0->stage_18 + + - + -stage_16 - -universe-planning-control +stage_19 + +universe-planning-control - + -stage_0->stage_16 - - - - +stage_0->stage_19 + + - + -stage_17 - -universe-vehicle-system +stage_20 + +universe-vehicle-system - + -stage_0->stage_17 - +stage_0->stage_20 + + - + -stage_18 - -universe +stage_21 + +universe - + -stage_0->stage_18 - - +stage_0->stage_21 + + + + + stage_1->stage_7 - - + + stage_2 - -rosdep-universe-sensing-perception-depend + +rosdep-universe-sensing-perception-depend stage_1->stage_2 - - + + stage_3 - -rosdep-universe-localization-mapping-depend + +rosdep-universe-localization-mapping-depend stage_1->stage_3 - - + + + stage_4 - -rosdep-universe-planning-control-depend + +rosdep-universe-planning-control-depend stage_1->stage_4 - - - + + stage_5 - -rosdep-universe-vehicle-system-depend + +rosdep-universe-vehicle-system-depend stage_1->stage_5 - - + + stage_6 - -rosdep-universe-depend + +rosdep-universe-depend stage_1->stage_6 - - - + + stage_8 - -universe-common-devel + +universe-common-devel stage_1->stage_8 - - + + - + stage_7->stage_8 - - + + - - -stage_2->stage_14 - - + + +stage_17 + +universe-sensing-perception-cuda + + + +stage_16->stage_17 + + + + + +stage_22 + +universe-cuda + + + +stage_21->stage_22 + + + + + +stage_2->stage_16 + + stage_9 - -universe-sensing-perception-devel + +universe-sensing-perception-devel stage_2->stage_9 - - - - - -stage_3->stage_15 - - + + stage_10 - -universe-localization-mapping-devel + +universe-sensing-perception-devel-cuda - - -stage_3->stage_10 - - + + +stage_2->stage_10 + + + - - -stage_4->stage_16 - - + + +stage_3->stage_18 + + stage_11 - -universe-planning-control-devel - - - -stage_4->stage_11 - - - - - -stage_5->stage_17 - - - + +universe-localization-mapping-devel + + + +stage_3->stage_11 + + + + + +stage_4->stage_19 + + stage_12 - -universe-vehicle-system-devel + +universe-planning-control-devel - - -stage_5->stage_12 - - + + +stage_4->stage_12 + + - + -stage_6->stage_18 - - +stage_5->stage_20 + + stage_13 - -universe-devel + +universe-vehicle-system-devel + + + +stage_5->stage_13 + + + + + +stage_6->stage_21 + - - -stage_6->stage_13 - - + + +stage_14 + +universe-devel + + + +stage_6->stage_14 + + - + stage_8->stage_9 - - - - - -stage_8->stage_10 - - + + - + stage_8->stage_11 - - + + - + stage_8->stage_12 - - + + - + stage_8->stage_13 - - + + + + + +stage_8->stage_14 + + + + + +stage_9->stage_16 + + + + + +stage_9->stage_10 + + - + stage_9->stage_14 - - + + - - -stage_9->stage_13 - - + + +stage_15 + +universe-devel-cuda - + stage_10->stage_15 - - - - - -stage_10->stage_13 - - - - - -stage_11->stage_16 - - - - - -stage_11->stage_13 - - - - - -stage_12->stage_17 - - - - - -stage_12->stage_13 - - - - - -stage_13->stage_18 - - + + + + + +stage_10->stage_17 + + + + + +stage_11->stage_18 + + + + + +stage_11->stage_14 + + + + + +stage_12->stage_19 + + + + + +stage_12->stage_14 + + + + + +stage_13->stage_20 + + + + + +stage_13->stage_14 + + + + + +stage_14->stage_21 + + + + + +stage_14->stage_15 + + + + + +stage_15->stage_22 + + diff --git a/docker/docker-bake-cuda.hcl b/docker/docker-bake-cuda.hcl new file mode 100644 index 00000000000..87aa27df879 --- /dev/null +++ b/docker/docker-bake-cuda.hcl @@ -0,0 +1,38 @@ +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" +}