Skip to content

Commit

Permalink
fix(docker): use prebuilt_base_image to build docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Shark Liu <[email protected]>
  • Loading branch information
Shark Liu committed Feb 17, 2023
1 parent b68eb4b commit aa3a80d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env[format('{0}', matrix.base_image_env)] }}
*.args.PREBUILT_BASE_IMAGE=${{ env.prebuilt_base_image }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
tag-prefix: ${{ env.rosdistro }}-
tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ env.rosdistro }}
*.args.BASE_IMAGE=${{ env[format('{0}', matrix.base_image_env)] }}
*.args.PREBUILT_BASE_IMAGE=${{ env.prebuilt_base_image }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
tag-prefix: ${{ env.rosdistro }}-
tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64
Expand Down
2 changes: 1 addition & 1 deletion amd64.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rosdistro=humble
rmw_implementation=rmw_cyclonedds_cpp
base_image=ubuntu:22.04
cuda_base_image=ubuntu:22.04
prebuilt_base_image=ubuntu:22.04
cuda_version=11.6
cudnn_version=8.4.1.50-1+cuda11.6
tensorrt_version=8.4.2-1+cuda11.6
4 changes: 2 additions & 2 deletions docker/autoware-universe/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG BASE_IMAGE
ARG PREBUILT_BASE_IMAGE
# hadolint ignore=DL3006
FROM $BASE_IMAGE as devel
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down Expand Up @@ -66,9 +67,8 @@ RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release \
&& find /autoware/install -type d -exec chmod 777 {} \;

ARG CUDA_BASE_IMAGE
# hadolint ignore=DL3006
FROM $CUDA_BASE_IMAGE as prebuilt
FROM $PREBUILT_BASE_IMAGE as prebuilt

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand Down
2 changes: 1 addition & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ docker buildx bake --no-cache --load --progress=plain -f "$SCRIPT_DIR/autoware-u
--set "*.args.ROS_DISTRO=$rosdistro" \
--set "*.args.BASE_IMAGE=$base_image" \
--set "*.args.SETUP_ARGS=$setup_args" \
--set "*.args.CUDA_BASE_IMAGE=$cuda_base_image" \
--set "*.args.PREBUILT_BASE_IMAGE=$prebuilt_base_image" \
--set "devel.tags=ghcr.io/autowarefoundation/autoware-universe:$rosdistro-latest$image_name_suffix" \
--set "prebuilt.tags=ghcr.io/autowarefoundation/autoware-universe:$rosdistro-latest-prebuilt$image_name_suffix"
set +x

0 comments on commit aa3a80d

Please sign in to comment.