Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker): provide modular images for openadkit planning simulator visualizer #4629

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
35c2aad
initial dockerfiles
oguzkaganozt Mar 13, 2024
85970ce
add necessary changes to workflows
oguzkaganozt Mar 13, 2024
ba18d04
Add base image to openadk-modular space
oguzkaganozt Mar 14, 2024
cf40f2a
refine simulator dockerfile
oguzkaganozt Mar 14, 2024
279854b
fix hcl file
oguzkaganozt Mar 14, 2024
17864b9
Add openadk-modular
oguzkaganozt Mar 14, 2024
c27bfbc
separate image tags
oguzkaganozt Mar 14, 2024
4a76333
remove perception
oguzkaganozt Mar 14, 2024
d8b130a
.
oguzkaganozt Mar 14, 2024
2815eee
.
oguzkaganozt Mar 14, 2024
ee6fb66
add openadk build into workflows
oguzkaganozt Mar 15, 2024
390f67b
Change self-hosted to arm64
oguzkaganozt Mar 15, 2024
a73b07e
separate openadk and autoware base packages
oguzkaganozt Mar 15, 2024
e29f3e2
.
oguzkaganozt Mar 15, 2024
ac80aa4
.
oguzkaganozt Mar 15, 2024
5adeb57
.
oguzkaganozt Mar 15, 2024
e8c7600
.
oguzkaganozt Mar 15, 2024
a9a2b2b
.
oguzkaganozt Mar 15, 2024
5e988e3
.
oguzkaganozt Mar 17, 2024
c0abcc7
.
oguzkaganozt Mar 18, 2024
3f43ea7
.
oguzkaganozt Mar 18, 2024
5fa3205
.
oguzkaganozt Mar 18, 2024
af22a35
.
oguzkaganozt Mar 19, 2024
dd09c46
rename to modules and some fixes
oguzkaganozt Apr 5, 2024
7e2322b
.
oguzkaganozt Apr 5, 2024
4fb2d67
merge conflicts
oguzkaganozt Apr 16, 2024
71e6e22
.
oguzkaganozt Apr 16, 2024
f3b3afb
style(pre-commit): autofix
pre-commit-ci[bot] Apr 16, 2024
2d75428
.
oguzkaganozt Apr 16, 2024
dc33803
style(pre-commit): autofix
pre-commit-ci[bot] Apr 16, 2024
dcf8a1c
.
oguzkaganozt Apr 16, 2024
e58ba9e
fix simulator dockerfile
oguzkaganozt Apr 17, 2024
e42eb9a
.
oguzkaganozt Apr 19, 2024
ee955de
style(pre-commit): autofix
pre-commit-ci[bot] Apr 19, 2024
383dc8e
add required depends
oguzkaganozt Apr 24, 2024
61a1d1c
fix
oguzkaganozt Apr 25, 2024
b7d5fbe
remove display at the planning container launch
oguzkaganozt Apr 25, 2024
695e12c
tidy up directory
oguzkaganozt Apr 25, 2024
35ae5bc
.
oguzkaganozt Apr 26, 2024
b927ff0
add planning-control launch file
oguzkaganozt Apr 26, 2024
2009d30
Update reduce framerate and increase timeout
oguzkaganozt Apr 26, 2024
2b7738c
add depends on docker-compose file
oguzkaganozt Apr 29, 2024
a767d94
.
oguzkaganozt Apr 30, 2024
de248e7
.
oguzkaganozt Apr 30, 2024
6cd0c73
add test artifacts to drive
oguzkaganozt Apr 30, 2024
df66a56
.
oguzkaganozt Apr 30, 2024
6917b03
docs(readme.md): improve shields (#4641)
xmfcx Apr 19, 2024
1382828
feat(ansible): set default value for install_dev variable (#4607)
mitsudome-r Apr 19, 2024
26f673b
ci(pre-commit): autoupdate (#4632)
awf-autoware-bot[bot] Apr 19, 2024
3ee0846
chore(deps): bump styfle/cancel-workflow-action from 0.12.0 to 0.12.1…
dependabot[bot] Apr 19, 2024
48f5216
chore(docker): append cspell ignore line to ignore spell check of `li…
youtalk Apr 23, 2024
1f20206
chore(docker): remove duplicate `ARG ROS_DISTRO` (#4649)
youtalk Apr 23, 2024
aa1692e
chore(docker): minimize `hadolint global ignore` options (#4650)
youtalk Apr 23, 2024
3ace49a
refactor: update ML model param files download (#4533)
badai-nguyen Apr 23, 2024
b3914ef
feat(pull_request_templates): improve the pull request template to en…
Owen-Liuyuxuan Apr 24, 2024
df57055
chore: add CODEWONERS file (#4652)
mitsudome-r Apr 24, 2024
20c5e14
feat: add awsim_labs support (#4660)
xmfcx Apr 24, 2024
2982084
Change self-hosted to arm64
oguzkaganozt Mar 15, 2024
fb9df30
separate openadk and autoware base packages
oguzkaganozt Mar 15, 2024
19c33ab
.
oguzkaganozt Apr 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/base/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Autoware",
"build": {
"dockerfile": "../Dockerfile",
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware-openadk:latest-devel" }
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel" }
},
"remoteUser": "autoware",
"runArgs": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cuda/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Autoware-cuda",
"build": {
"dockerfile": "../Dockerfile",
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware-openadk:latest-devel-cuda" }
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel-cuda" }
},
"remoteUser": "autoware",
"hostRequirements": {
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [email protected] [email protected]
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/small-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Not applicable.

Not applicable.

## Interface changes

<!-- Describe any changed interfaces, such as topics, services, or parameters, including debugging interfaces -->

## Pre-review checklist for the PR author

The PR author **must** check the checkboxes below when creating the PR.
Expand Down
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/standard-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@

<!-- Describe any changed interfaces, such as topics, services, or parameters. -->

### ROS Topic Changes

<!-- | Topic Name | Type | Direction | Update Description | -->
<!-- | ---------------- | ------------------- | --------- | ------------------------------------------------------------- | -->
<!-- | `/example_topic` | `std_msgs/String` | Subscribe | Description of what the topic is used for in the system | -->
<!-- | `/another_topic` | `sensor_msgs/Image` | Publish | Also explain if it is added / modified / deleted with the PR | -->

### ROS Parameter Changes

<!-- | Parameter Name | Default Value | Update Description | -->
<!-- | -------------------- | ------------- | --------------------------------------------------- | -->
<!-- | `example_parameters` | `1.0` | Describe the parameter and also explain the updates | -->

## Effects on system behavior

<!-- Describe how this PR affects the system behavior. -->
Expand Down
201 changes: 201 additions & 0 deletions .github/actions/docker-build-and-push-openadk/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
name: docker-build-and-push-openadk
description: ""

inputs:
bake-target:
description: ""
required: true
build-args:
description: ""
required: false
tag-prefix:
description: ""
required: false
tag-suffix:
description: ""
required: false
tag-arch:
description: ""
required: false
allow-push:
description: ""
default: "true"
required: false

runs:
using: composite
steps:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Install jq
run: |
sudo apt-get -y update
sudo apt-get -y install jq
shell: bash

- name: Set Docker tags
id: set-docker-tags
run: |
tags=()
if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref_type }}" == "tag" ]; then
tags+=("$(echo "${{ github.ref }}" | sed -E 's/.*([vV][0-9]+\.[0-9]+\.[0-9]+).*/\1/')")
fi

tags+=("{{date 'YYYYMMDD'}}")
tags+=("latest")
tags+=("latest-${{ inputs.tag-prefix }}")

# Output multiline strings: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "tags<<$EOF" >> $GITHUB_OUTPUT
echo "$(printf "%s\n" "${tags[@]}")" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
shell: bash

# openadk modular images meta
- name: Docker meta for openadk:base
id: meta-base
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-base
flavor: |
latest=false
suffix=-base-${{ inputs.tag-arch }}

- name: Docker meta for openadk:planning-control
id: meta-planning-control
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-planning-control
flavor: |
latest=false
suffix=-planning-control-${{ inputs.tag-arch }}

- name: Docker meta for openadk:visualizer
id: meta-visualizer
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-visualizer
flavor: |
latest=false
suffix=-visualizer-${{ inputs.tag-arch }}

- name: Docker meta for openadk:simulator
id: meta-simulator
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-simulator
flavor: |
latest=false
suffix=-simulator-${{ inputs.tag-arch }}

- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}

- name: Build and Push to GitHub Container Registry
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v3
with:
push: ${{ inputs.allow-push == 'true' }}
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-planning-control.outputs.bake-file }}
${{ steps.meta-visualizer.outputs.bake-file }}
${{ steps.meta-simulator.outputs.bake-file }}
provenance: false
targets: |
base
set: |
${{ inputs.build-args }}

- name: Build and Save Artifacts
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
uses: docker/bake-action@v3
with:
push: false
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-planning-control.outputs.bake-file }}
${{ steps.meta-visualizer.outputs.bake-file }}
${{ steps.meta-simulator.outputs.bake-file }}
provenance: false
set: |
${{ inputs.build-args }}
base.output=type=docker,dest=/tmp/base.tar
planning-control.output=type=docker,dest=/tmp/planning-control.tar
visualizer.output=type=docker,dest=/tmp/visualizer.tar
simulator.output=type=docker,dest=/tmp/simulator.tar

- name: Upload Artifact - base
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-base
uses: actions/upload-artifact@v4
with:
name: base-image${{ inputs.tag-suffix }}
path: /tmp/base.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: error

- name: Upload Artifact - planning-control
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-planning-control
uses: actions/upload-artifact@v4
with:
name: planning-control-image${{ inputs.tag-suffix }}
path: /tmp/planning-control.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: error

- name: Upload Artifact - visualizer
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-visualizer
uses: actions/upload-artifact@v4
with:
name: visualizer-image${{ inputs.tag-suffix }}
path: /tmp/visualizer.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: error

- name: Upload Artifact - simulator
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: artifact-upload-step-simulator
uses: actions/upload-artifact@v4
with:
name: simulator-image${{ inputs.tag-suffix }}
path: /tmp/simulator.tar
retention-days: 7
compression-level: 6
overwrite: true
if-no-files-found: error

- name: Output artifact URLs
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: output-artifact-urls
run: |
echo 'base URL ${{ steps.artifact-upload-step-base.outputs.artifact-url }}'
echo 'planning-control URL ${{ steps.artifact-upload-step-planning-control.outputs.artifact-url }}'
echo 'visualizer URL ${{ steps.artifact-upload-step-visualizer.outputs.artifact-url }}'
echo 'simulator URL ${{ steps.artifact-upload-step-simulator.outputs.artifact-url }}'
shell: bash
38 changes: 10 additions & 28 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ inputs:
tag-suffix:
description: ""
required: false
tag-arch:
description: ""
required: false
allow-push:
description: ""
default: "true"
Expand Down Expand Up @@ -59,7 +62,7 @@ runs:
bake-target: docker-metadata-action-prebuilt
flavor: |
latest=false
suffix=-prebuilt${{ inputs.tag-suffix }}
suffix=-prebuilt${{ inputs.tag-suffix }}-${{ inputs.tag-arch }}

- name: Docker meta for devel
id: meta-devel
Expand All @@ -70,10 +73,9 @@ runs:
bake-target: docker-metadata-action-devel
flavor: |
latest=false
suffix=-devel${{ inputs.tag-suffix }}
suffix=-devel${{ inputs.tag-suffix }}-${{ inputs.tag-arch }}

- name: Docker meta for runtime
if: ${{ github.event_name == 'workflow_dispatch' }} || ${{ (github.event_name == 'push' && github.ref_type == 'tag') }}
id: meta-runtime
uses: docker/metadata-action@v4
with:
Expand All @@ -82,7 +84,7 @@ runs:
bake-target: docker-metadata-action-runtime
flavor: |
latest=${{ github.event_name == 'push' && github.ref_type == 'tag' }}
suffix=-runtime${{ inputs.tag-suffix }}
suffix=-runtime${{ inputs.tag-suffix }}-${{ inputs.tag-arch }}

- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -92,31 +94,15 @@ runs:
username: ${{ github.repository_owner }}
password: ${{ github.token }}

- name: Build and Push - prebuilt and devel
if: ${{ (github.event_name == 'push' && github.ref_type == 'branch') || github.event_name == 'schedule' }}
- name: Build and Push to GitHub Container Registry
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v3
with:
push: ${{ inputs.allow-push == 'true' }}
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
targets: |
prebuilt
devel
provenance: false
set: |
${{ inputs.build-args }}

- name: Build and Publish to GitHub Container Registry
if: ${{ ( github.event_name == 'push' && github.ref_type == 'tag' ) || ( github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v3
with:
push: true
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
provenance: false
set: |
Expand All @@ -129,8 +115,8 @@ runs:
push: false
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
provenance: false
set: |
Expand Down Expand Up @@ -176,14 +162,10 @@ runs:
if-no-files-found: error

- name: Output artifact URLs
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
id: output-artifact-urls
run: |
echo 'prebuilt URL ${{ steps.artifact-upload-step-prebuilt.outputs.artifact-url }}'
echo 'devel URL ${{ steps.artifact-upload-step-devel.outputs.artifact-url }}'
echo 'runtime URL ${{ steps.artifact-upload-step-runtime.outputs.artifact-url }}'
shell: bash

- name: Show ccache stats
run: |
ccache -s
shell: bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-main-self-hosted
name: build-main-arm64

on:
schedule:
Expand All @@ -13,7 +13,7 @@ on:
default: tarball

jobs:
build-main-self-hosted:
build-main-arm64:
runs-on: [self-hosted, linux, ARM64]
strategy:
fail-fast: false
Expand Down Expand Up @@ -51,9 +51,9 @@ jobs:
fi

- name: Build 'autoware-universe'
uses: ./.github/actions/docker-build-and-push
uses: ./.github/actions/docker-build-push
with:
bake-target: autoware-openadk
bake-target: autoware
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ env.rosdistro }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
fi

- name: Build 'autoware-universe'
uses: ./.github/actions/docker-build-and-push
uses: ./.github/actions/docker-build-push
with:
bake-target: autoware-openadk
bake-target: autoware
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
Expand Down
Loading