Skip to content

Commit

Permalink
feat(docker image): add no-CUDA images (autowarefoundation#346)
Browse files Browse the repository at this point in the history
* feat(docker image): add no-CUDA images

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix ref

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
kenji-miyake authored May 24, 2022
1 parent b455cd2 commit 7ce2de9
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: main
ref: ""

- name: Run setup script
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: main
ref: ""

- name: Run setup script
run: |
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/docker-build-and-push-humble-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,30 @@ jobs:
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
- name: Build 'autoware-universe' without CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-nvidia
tag-prefix: ${{ env.rosdistro }}-
tag-suffix: -arm64

- name: Build 'autoware-universe' with CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-cuda-drivers
tag-prefix: ${{ env.rosdistro }}-cuda-
tag-suffix: -arm64

- name: Show disk space
run: |
df -h
15 changes: 14 additions & 1 deletion .github/workflows/docker-build-and-push-humble.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,30 @@ jobs:
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
- name: Build 'autoware-universe' without CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-nvidia
tag-prefix: ${{ env.rosdistro }}-
tag-suffix: -amd64

- name: Build 'autoware-universe' with CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-cuda-drivers
tag-prefix: ${{ env.rosdistro }}-cuda-
tag-suffix: -amd64

- name: Show disk space
run: |
df -h
17 changes: 15 additions & 2 deletions .github/workflows/docker-build-and-push-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: main
ref: ""

- name: Free disk space
uses: ./.github/actions/free-disk-space
Expand All @@ -32,17 +32,30 @@ jobs:
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
- name: Build 'autoware-universe' without CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-nvidia
tag-prefix: ${{ env.rosdistro }}-
tag-suffix: -arm64

- name: Build 'autoware-universe' with CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-cuda-drivers
tag-prefix: ${{ env.rosdistro }}-cuda-
tag-suffix: -arm64

- name: Show disk space
run: |
df -h
17 changes: 15 additions & 2 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: main
ref: ""

- name: Free disk space
uses: ./.github/actions/free-disk-space
Expand All @@ -27,17 +27,30 @@ jobs:
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
- name: Build 'autoware-universe' without CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-nvidia
tag-prefix: ${{ env.rosdistro }}-
tag-suffix: -amd64

- name: Build 'autoware-universe' with CUDA
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-universe
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env.base_image }}
*.args.SETUP_ARGS=--no-cuda-drivers
tag-prefix: ${{ env.rosdistro }}-cuda-
tag-suffix: -amd64

- name: Show disk space
run: |
df -h
3 changes: 2 additions & 1 deletion docker/autoware-universe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM $BASE_IMAGE as devel
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG ROS_DISTRO
ARG SETUP_ARGS

## Install apt packages
# hadolint ignore=DL3008
Expand All @@ -25,7 +26,7 @@ RUN mkdir -p ~/.ssh \

## Set up development environment
RUN --mount=type=ssh \
./setup-dev-env.sh -y --no-cuda-drivers universe \
./setup-dev-env.sh -y $SETUP_ARGS universe \
&& pip uninstall -y ansible ansible-core \
&& mkdir src \
&& vcs import src < autoware.repos \
Expand Down
1 change: 1 addition & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/autoware-universe/doc
--set "*.platform=$platform" \
--set "*.args.ROS_DISTRO=$rosdistro" \
--set "*.args.BASE_IMAGE=$base_image" \
--set "*.args.SETUP_ARGS=--no-cuda-drivers" \
--set "devel.tags=ghcr.io/autowarefoundation/autoware-universe:$rosdistro-latest" \
--set "prebuilt.tags=ghcr.io/autowarefoundation/autoware-universe:$rosdistro-latest-prebuilt"

0 comments on commit 7ce2de9

Please sign in to comment.