Skip to content

Commit

Permalink
chore: sync upstream (autowarefoundation#402)
Browse files Browse the repository at this point in the history
* chore: add reviewer/assignee of sync-awf-latest-reference-design's PR (autowarefoundation#594)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* ci(slack-send): remove unused workflow (autowarefoundation#600)

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>

* ci(sync-files): sync .fdignore and .rgignore (autowarefoundation#601)

* chore: sync files (autowarefoundation#588)

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: kenji-miyake <kenji-miyake@users.noreply.github.com>

* feat: rename launch branch (autowarefoundation#604)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* feat: remove sync-awf-latest-<reference-desing>.yaml (autowarefoundation#608)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* chore: sync files (autowarefoundation#602)

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: kenji-miyake <kenji-miyake@users.noreply.github.com>

---------

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Tomohito Ando <tomohito.ando@tier4.jp>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: Tomohito ANDO <tomohito.ando@tier4.jp>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: tier4-autoware-private-bot[bot] <87871706+tier4-autoware-private-bot[bot]@users.noreply.github.com>
Co-authored-by: kenji-miyake <kenji-miyake@users.noreply.github.com>
Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>
  • Loading branch information
6 people authored Mar 15, 2023
1 parent fd9e8ce commit 01e3186
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 146 deletions.
1 change: 1 addition & 0 deletions .fdignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!/src/
2 changes: 2 additions & 0 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
- source: .github/workflows/sync-files.yaml
- source: .clang-format
- source: .clang-tidy
- source: .fdignore
- source: .gitignore
- source: .markdownlint.yaml
- source: .pre-commit-config.yaml
- source: .pre-commit-config-ansible.yaml
- source: .pre-commit-config-optional.yaml
- source: .prettierignore
- source: .prettierrc.yaml
- source: .rgignore
- source: .shellcheckrc
- source: .yamllint.yaml
- source: CPPLINT.cfg
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
pre-commit:
if: ${{ github.event.repository.private }}
if: ${{ github.event.repository.private }} # Use pre-commit.ci for public repositories
runs-on: ubuntu-latest
steps:
- name: Generate token
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/slack-send.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
workflow_run:
workflows:
- build-main
- build-humble
types:
- completed

Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/sync-awf-latest-s1.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/sync-awf-latest-x1.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/sync-awf-latest-x2.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/sync-awf-latest-xx1.yaml

This file was deleted.

11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ci:
autofix_commit_msg: "style(pre-commit): autofix"
autoupdate_commit_msg: "ci(pre-commit): autoupdate"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -18,7 +17,7 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
rev: v0.33.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]
Expand All @@ -29,23 +28,23 @@ repos:
- id: prettier

- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
rev: v1.29.0
hooks:
- id: yamllint

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
rev: v0.9.0.2
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.5.1-1
rev: v3.6.0-1
hooks:
- id: shfmt
args: [-w, -s, -i=4]

- repo: https://github.com/AleksaC/hadolint-py
rev: v2.10.0
rev: v2.12.0.2
hooks:
- id: hadolint

Expand Down
1 change: 1 addition & 0 deletions .rgignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!/src/
1 change: 1 addition & 0 deletions amd64.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,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
2 changes: 1 addition & 1 deletion ansible-galaxy-requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ collections:

- name: https://github.com/autowarefoundation/autoware.git#/ansible
type: git
version: 9da9b5e25d40b5c9d4d7141ef807325de2077bcf
version: dfefdef4d308a4418097a6d6b9b67b588c061fe8
2 changes: 1 addition & 1 deletion autoware.repos
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories:
autoware/launcher:
type: git
url: git@github.com:tier4/autoware_launch.x1.eve.git
version: tier4/universe
version: tier4/main
autoware/aip_launcher:
type: git
url: https://github.com/tier4/aip_launcher.git
Expand Down
17 changes: 15 additions & 2 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ while [ "$1" != "" ]; do
option_platform="$2"
shift
;;
--no-prebuilt)
option_no_prebuilt=true
;;
*)
args+=("$1")
;;
Expand All @@ -32,6 +35,14 @@ else
image_name_suffix="-cuda"
fi

# Set prebuilt options
if [ "$option_no_prebuilt" = "true" ]; then
targets=("devel")
else
# default targets include devel and prebuilt
targets=()
fi

# Set platform
if [ -n "$option_platform" ]; then
platform="$option_platform"
Expand All @@ -52,13 +63,15 @@ fi
export BUILDKIT_STEP_LOG_MAX_SIZE=10000000

set -x
docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/pilot-auto/docker-bake.hcl" \
docker buildx bake --no-cache --load --progress=plain -f "$SCRIPT_DIR/pilot-auto/docker-bake.hcl" \
--set "*.context=$WORKSPACE_ROOT" \
--set "*.ssh=default" \
--set "*.platform=$platform" \
--set "*.args.ROS_DISTRO=$rosdistro" \
--set "*.args.BASE_IMAGE=$base_image" \
--set "*.args.PREBUILT_BASE_IMAGE=$prebuilt_base_image" \
--set "*.args.SETUP_ARGS=$setup_args" \
--set "devel.tags=ghcr.io/tier4/pilot-auto:$rosdistro-latest$image_name_suffix" \
--set "prebuilt.tags=ghcr.io/tier4/pilot-auto:$rosdistro-latest-prebuilt$image_name_suffix"
--set "prebuilt.tags=ghcr.io/tier4/pilot-auto:$rosdistro-latest-prebuilt$image_name_suffix" \
"${targets[@]}"
set +x
67 changes: 62 additions & 5 deletions docker/pilot-auto/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Image args should come at the beginning.
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 @@ -43,10 +45,10 @@ RUN rm -rf \
/etc/apt/sources.list.d/nvidia-docker.list

## Register Vulkan GPU vendors
ADD "https://gitlab.com/nvidia/container-images/vulkan/raw/dc389b0445c788901fda1d85be96fd1cb9410164/nvidia_icd.json" /etc/vulkan/icd.d/nvidia_icd.json
RUN chmod 644 /etc/vulkan/icd.d/nvidia_icd.json
ADD "https://gitlab.com/nvidia/container-images/opengl/raw/5191cf205d3e4bb1150091f9464499b076104354/glvnd/runtime/10_nvidia.json" /etc/glvnd/egl_vendor.d/10_nvidia.json
RUN chmod 644 /etc/glvnd/egl_vendor.d/10_nvidia.json
RUN curl https://gitlab.com/nvidia/container-images/vulkan/raw/dc389b0445c788901fda1d85be96fd1cb9410164/nvidia_icd.json -o /etc/vulkan/icd.d/nvidia_icd.json \
&& chmod 644 /etc/vulkan/icd.d/nvidia_icd.json
RUN curl https://gitlab.com/nvidia/container-images/opengl/raw/5191cf205d3e4bb1150091f9464499b076104354/glvnd/runtime/10_nvidia.json -o /etc/glvnd/egl_vendor.d/10_nvidia.json \
&& chmod 644 /etc/glvnd/egl_vendor.d/10_nvidia.json

## Register OpenCL GPU vendors
RUN mkdir -p /etc/OpenCL/vendors \
Expand All @@ -58,14 +60,69 @@ RUN mkdir -p /etc/OpenCL/vendors \
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" > /etc/bash.bashrc
CMD ["/bin/bash"]

FROM devel as prebuilt
FROM devel as builder
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

## Build and change permission for runtime data conversion
RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release \
&& find /autoware/install -type d -exec chmod 777 {} \;

# hadolint ignore=DL3006
FROM $PREBUILT_BASE_IMAGE as prebuilt

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

ARG ROS_DISTRO
ARG SETUP_ARGS

## Install apt packages
# hadolint ignore=DL3008
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
git \
ssh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

## Copy files
COPY autoware.repos setup-dev-env.sh ansible-galaxy-requirements.yaml amd64.env arm64.env /autoware/
COPY ansible/ /autoware/ansible/
WORKDIR /autoware
RUN ls /autoware

## Add GitHub to known hosts for private repositories
RUN mkdir -p ~/.ssh \
&& ssh-keyscan github.com >> ~/.ssh/known_hosts

## Set up runtime environment
RUN --mount=type=ssh \
./setup-dev-env.sh -y $SETUP_ARGS --no-cuda-drivers --runtime local_dev_env \
&& pip uninstall -y ansible ansible-core \
&& mkdir src \
&& vcs import src < autoware.repos \
&& rosdep update \
&& DEBIAN_FRONTEND=noninteractive rosdep install -y --ignore-src --from-paths src --rosdistro "$ROS_DISTRO" \
&& rm -rf src \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

## Copy install folder from builder
COPY --from=builder /autoware/install/ /autoware/install/

## Clean up unnecessary files
RUN rm -rf \
"$HOME"/.cache \
/etc/apt/sources.list.d/cuda*.list \
/etc/apt/sources.list.d/docker.list \
/etc/apt/sources.list.d/nvidia-docker.list

## Register Vulkan GPU vendors
ADD "https://gitlab.com/nvidia/container-images/vulkan/raw/dc389b0445c788901fda1d85be96fd1cb9410164/nvidia_icd.json" /etc/vulkan/icd.d/nvidia_icd.json
RUN chmod 644 /etc/vulkan/icd.d/nvidia_icd.json
ADD "https://gitlab.com/nvidia/container-images/opengl/raw/5191cf205d3e4bb1150091f9464499b076104354/glvnd/runtime/10_nvidia.json" /etc/glvnd/egl_vendor.d/10_nvidia.json
RUN chmod 644 /etc/glvnd/egl_vendor.d/10_nvidia.json

## Create entrypoint
# hadolint ignore=DL3059
RUN echo "source /autoware/install/setup.bash" > /etc/bash.bashrc
CMD ["/bin/bash"]
Loading

0 comments on commit 01e3186

Please sign in to comment.