Skip to content

Commit

Permalink
feat(docker): add universe-planning-control runtime image (autoware…
Browse files Browse the repository at this point in the history
…foundation#5195)

* update docker

Signed-off-by: Yutaka Kondo <[email protected]>

* update action

Signed-off-by: Yutaka Kondo <[email protected]>

* update readme

Signed-off-by: Yutaka Kondo <[email protected]>

* fix images

Signed-off-by: Yutaka Kondo <[email protected]>

* not download artifacts

Signed-off-by: Yutaka Kondo <[email protected]>

* add universe-planning-control-devel

Signed-off-by: Yutaka Kondo <[email protected]>

* fix copy

Signed-off-by: Yutaka Kondo <[email protected]>

* add copy

Signed-off-by: Yutaka Kondo <[email protected]>

* fix copy

Signed-off-by: Yutaka Kondo <[email protected]>

* add linefeed

Signed-off-by: Yutaka Kondo <[email protected]>

* add pcl

Signed-off-by: Yutaka Kondo <[email protected]>

* update svg

Signed-off-by: Yutaka Kondo <[email protected]>

* update readme

Signed-off-by: Yutaka Kondo <[email protected]>

* add planning-control image

Signed-off-by: Yutaka Kondo <[email protected]>

* update svg

Signed-off-by: Yutaka Kondo <[email protected]>

* use ghcr.io

Signed-off-by: Yutaka Kondo <[email protected]>

* update readme

Signed-off-by: Yutaka Kondo <[email protected]>

* not download artifacts

Signed-off-by: Yutaka Kondo <[email protected]>

* chore(docker): remove ansible config files from runtime images (autowarefoundation#5192)

* remove ansible files from runtime images

Signed-off-by: Yutaka Kondo <[email protected]>

* update rm -rf

Signed-off-by: Yutaka Kondo <[email protected]>

---------

Signed-off-by: Yutaka Kondo <[email protected]>

---------

Signed-off-by: Yutaka Kondo <[email protected]>
  • Loading branch information
youtalk authored Sep 9, 2024
1 parent de26d57 commit bd793d2
Show file tree
Hide file tree
Showing 5 changed files with 262 additions and 152 deletions.
24 changes: 24 additions & 0 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,28 @@ runs:
latest=false
suffix=-universe-localization-mapping${{ inputs.tag-suffix }}
- name: Docker meta for autoware:universe-planning-control-devel
id: meta-universe-planning-control-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-universe-planning-control-devel
flavor: |
latest=false
suffix=-universe-planning-control-devel${{ inputs.tag-suffix }}
- name: Docker meta for autoware:universe-planning-control
id: meta-universe-planning-control
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-universe-planning-control
flavor: |
latest=false
suffix=-universe-planning-control${{ inputs.tag-suffix }}
- name: Docker meta for autoware:universe-devel
id: meta-universe-devel
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -196,6 +218,8 @@ runs:
${{ steps.meta-universe-sensing-perception.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 }}
${{ steps.meta-universe-planning-control.outputs.bake-file }}
${{ steps.meta-universe-devel.outputs.bake-file }}
${{ steps.meta-universe.outputs.bake-file }}
provenance: false
Expand Down
47 changes: 44 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ RUN rosdep keys --ignore-src --from-paths src \
| sort \
> /rosdep-universe-planning-control-depend-packages.txt \
&& cat /rosdep-universe-planning-control-depend-packages.txt
RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \
| xargs rosdep resolve --rosdistro ${ROS_DISTRO} \
| grep -v '^#' \
| sed 's/ \+/\n/g'\
| sort \
> /rosdep-universe-planning-control-exec-depend-packages.txt \
&& cat /rosdep-universe-planning-control-exec-depend-packages.txt

FROM rosdep-depend AS rosdep-universe-depend
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down Expand Up @@ -397,7 +404,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 \
&& 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*
Expand Down Expand Up @@ -431,7 +438,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 \
&& 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*
Expand All @@ -445,6 +452,40 @@ RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]

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
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 \
&& 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 \
&& 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-planning-control-devel /opt/autoware /opt/autoware

# Copy bash aliases
COPY docker/etc/.bash_aliases /root/.bash_aliases
RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc

ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]

FROM base AS universe
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
Expand All @@ -465,7 +506,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 \
&& 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*
Expand Down
Loading

0 comments on commit bd793d2

Please sign in to comment.