diff --git a/.devcontainer/base/devcontainer.json b/.devcontainer/base/devcontainer.json index f3b5ffe9984..fdef3562af1 100644 --- a/.devcontainer/base/devcontainer.json +++ b/.devcontainer/base/devcontainer.json @@ -1,8 +1,8 @@ { - "name": "Autoware", + "name": "autoware:universe-devel", "build": { "dockerfile": "../Dockerfile", - "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel" } + "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:universe-devel" } }, "remoteUser": "autoware", "runArgs": [ diff --git a/.devcontainer/cuda/devcontainer.json b/.devcontainer/cuda/devcontainer.json index bb0b6ad849e..3a6a1c247a1 100644 --- a/.devcontainer/cuda/devcontainer.json +++ b/.devcontainer/cuda/devcontainer.json @@ -1,8 +1,8 @@ { - "name": "Autoware-cuda", + "name": "autoware:universe-devel-cuda", "build": { "dockerfile": "../Dockerfile", - "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel-cuda" } + "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:universe-devel-cuda" } }, "remoteUser": "autoware", "hostRequirements": { diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 1d30b4b5a57..3d2af2f27ea 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -14,9 +14,6 @@ inputs: build-args: description: "" required: false - tag-prefix: - description: "" - required: false tag-suffix: description: "" required: false @@ -73,23 +70,9 @@ runs: } skip-extraction: true - - 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 + - name: Get current date + id: date + run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT shell: bash - name: Docker meta for autoware:base @@ -97,66 +80,120 @@ runs: uses: docker/metadata-action@v5 with: images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} + tags: | + type=raw,value=base${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=base${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} bake-target: docker-metadata-action-base flavor: | latest=false - suffix=-base${{ inputs.tag-suffix }} - name: Docker meta for autoware:core-devel id: meta-core-devel uses: docker/metadata-action@v5 with: images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} + tags: | + type=raw,value=core-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=core-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} bake-target: docker-metadata-action-core-devel flavor: | latest=false - suffix=-core-devel${{ inputs.tag-suffix }} - name: Docker meta for autoware:universe-sensing-perception-devel id: meta-universe-sensing-perception-devel uses: docker/metadata-action@v5 with: images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} + tags: | + type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} bake-target: docker-metadata-action-universe-sensing-perception-devel flavor: | latest=false - suffix=-universe-sensing-perception-devel${{ inputs.tag-suffix }} - name: Docker meta for autoware:universe-sensing-perception id: meta-universe-sensing-perception uses: docker/metadata-action@v5 with: images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} + tags: | + type=raw,value=universe-sensing-perception${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-sensing-perception${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} bake-target: docker-metadata-action-universe-sensing-perception flavor: | latest=false - suffix=-universe-sensing-perception${{ inputs.tag-suffix }} + + - name: Docker meta for autoware:universe-localization-mapping-devel + id: meta-universe-localization-mapping-devel + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + bake-target: docker-metadata-action-universe-localization-mapping-devel + flavor: | + latest=false + + - name: Docker meta for autoware:universe-localization-mapping + id: meta-universe-localization-mapping + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-localization-mapping${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-localization-mapping${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + bake-target: docker-metadata-action-universe-localization-mapping + flavor: | + latest=false + + - name: Docker meta for autoware:universe-planning-control-devel + id: meta-universe-planning-control-devel + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + bake-target: docker-metadata-action-universe-planning-control-devel + flavor: | + latest=false + + - name: Docker meta for autoware:universe-planning-control + id: meta-universe-planning-control + uses: docker/metadata-action@v5 + with: + images: ${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-planning-control${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-planning-control${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + bake-target: docker-metadata-action-universe-planning-control + flavor: | + latest=false - name: Docker meta for autoware:universe-devel id: meta-universe-devel uses: docker/metadata-action@v5 with: images: ${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} + tags: | + type=raw,value=universe-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} bake-target: docker-metadata-action-universe-devel flavor: | latest=false - suffix=-universe-devel${{ inputs.tag-suffix }} - name: Docker meta for autoware:universe id: meta-universe uses: docker/metadata-action@v5 with: - images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} + images: ${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} bake-target: docker-metadata-action-universe flavor: | latest=auto - suffix=-universe${{ inputs.tag-suffix }} - name: Login to Docker Hub uses: docker/login-action@v3 @@ -174,6 +211,10 @@ runs: ${{ steps.meta-core-devel.outputs.bake-file }} ${{ steps.meta-universe-sensing-perception-devel.outputs.bake-file }} ${{ 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 diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 0318ba4552a..002f273b185 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -31,7 +31,7 @@ jobs: platform: arm64 base_image_env: base_image lib_dir: aarch64 - additional-tag-suffix: -cuda + additional-tag-suffix: cuda steps: - name: Check if PR author is the specific user id: author-check @@ -87,7 +87,6 @@ jobs: *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }},mode=max tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }} - tag-prefix: ${{ needs.load-env.outputs.rosdistro }} dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} - name: Show disk space diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index 64430b505c5..29da33a5b1f 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -31,7 +31,7 @@ jobs: platform: amd64 base_image_env: base_image lib_dir: x86_64 - additional-tag-suffix: -cuda + additional-tag-suffix: cuda steps: - name: Check if PR author is the specific user id: author-check @@ -87,7 +87,6 @@ jobs: *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }},mode=max tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }} - tag-prefix: ${{ needs.load-env.outputs.rosdistro }} dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} - name: Show disk space diff --git a/.webauto-ci.yaml b/.webauto-ci.yaml index 74a23b71d4e..2d6771107f5 100644 --- a/.webauto-ci.yaml +++ b/.webauto-ci.yaml @@ -1,9 +1,77 @@ +# The configuration file for Web.Auto CI/CD tool. +# https://docs.web.auto/user-manuals/evaluator/configuration/reference/introduction + version: 2 artifacts: - name: main + metadata: + play-ondemand.ci.web.auto/buildspec: Autoware-Humble_v0.29.0 build: - type: tier4/universe/main/amd64/v1 + type: custom + runtime: + type: standard1/amd64/large + source: + vcstool: + repositories_files: + - autoware.repos + - simulator.repos + import_path: src + environment_variables: + AUTOWARE_PATH: /opt/autoware + DEBIAN_FRONTEND: noninteractive + LANG: C.UTF-8 + phases: + - name: environment-setup + user: root + exec: ./.webauto-ci/main/environment-setup/run.sh + caches: + - name: apt-lists + mountpoint: /var/lib/apt/lists + - name: apt-archives + mountpoint: /var/cache/apt/archives + build_result_reuse: + key_files: + - .webauto-ci/main/environment-setup/**/* + - name: autoware-setup + user: autoware + exec: ./.webauto-ci/main/autoware-setup/run.sh + caches: + - name: apt-lists + mountpoint: /var/lib/apt/lists + - name: apt-archives + mountpoint: /var/cache/apt/archives + build_result_reuse: + key_files: + - .webauto-ci/main/autoware-setup/**/* + - ansible/**/* + - ansible-galaxy-requirements.yaml + - amd64.env + incremental_build: + enabled: true + - name: autoware-build + user: autoware + exec: ./.webauto-ci/main/autoware-build/run.sh + environment_variables: + PARALLEL_WORKERS: "32" + CCACHE_DIR: /tmp/build/cache/ccache + caches: + - name: apt-lists + mountpoint: /var/lib/apt/lists + - name: apt-archives + mountpoint: /var/cache/apt/archives + - name: ccache + mountpoint: /tmp/build/cache/ccache + build_result_reuse: + key_files: + - .webauto-ci/main/autoware-build/**/* + - src/**/* + base_container_image: + from: ubuntu:22.04 + output_container_image: + from: autoware-build + workdir: /opt/autoware + user: autoware simulations: - name: lexus_planning_sim @@ -13,9 +81,7 @@ simulations: type: container artifact: main runtime: - type: simulator/standard1/amd64/medium - cpu: 8 - memory: 16384 + type: standard1/amd64/medium parameters: launch_autoware: "true" autoware_launch_package: autoware_launch diff --git a/.webauto-ci/main/autoware-build/run.sh b/.webauto-ci/main/autoware-build/run.sh new file mode 100755 index 00000000000..f6d3751afad --- /dev/null +++ b/.webauto-ci/main/autoware-build/run.sh @@ -0,0 +1,44 @@ +#!/bin/bash -e + +: "${WEBAUTO_CI_SOURCE_PATH:?is not set}" +: "${WEBAUTO_CI_DEBUG_BUILD:?is not set}" + +: "${AUTOWARE_PATH:?is not set}" +: "${CCACHE_DIR:=}" +: "${CCACHE_SIZE:=1G}" +: "${PARALLEL_WORKERS:=4}" + +sudo mkdir "$AUTOWARE_PATH" +sudo chown "$(whoami)": "$AUTOWARE_PATH" +cd "$WEBAUTO_CI_SOURCE_PATH" +cp -r src .webauto-ci.* "$AUTOWARE_PATH" +cd "$AUTOWARE_PATH" + +if [ -n "$CCACHE_DIR" ]; then + mkdir -p "$CCACHE_DIR" + export USE_CCACHE=1 + export CCACHE_DIR="$CCACHE_DIR" + export CC="/usr/lib/ccache/gcc" + export CXX="/usr/lib/ccache/g++" + ccache -M "$CCACHE_SIZE" +fi + +sudo -E apt-get -y update + +# shellcheck disable=SC2012 +ROS_DISTRO=$(ls -1 /opt/ros | head -1) +# shellcheck disable=SC1090 +source "/opt/ros/$ROS_DISTRO/setup.bash" +rosdep update +rosdep install -y --from-paths src --ignore-src --rosdistro "$ROS_DISTRO" + +[[ $WEBAUTO_CI_DEBUG_BUILD == "true" ]] && build_type="RelWithDebInfo" || build_type="Release" + +colcon build \ + --cmake-args -DCMAKE_BUILD_TYPE="$build_type" -DBUILD_TESTING=off -Wno-dev --no-warn-unused-cli \ + --symlink-install \ + --catkin-skip-building-tests \ + --executor parallel \ + --parallel-workers "$PARALLEL_WORKERS" + +sudo -E apt-get -y autoremove diff --git a/.webauto-ci/main/autoware-setup/run.sh b/.webauto-ci/main/autoware-setup/run.sh new file mode 100755 index 00000000000..a4f840c9398 --- /dev/null +++ b/.webauto-ci/main/autoware-setup/run.sh @@ -0,0 +1,20 @@ +#!/bin/bash -e + +ansible_args=() +ansible_args+=("--extra-vars" "prompt_install_nvidia=y") +ansible_args+=("--extra-vars" "prompt_download_artifacts=y") +ansible_args+=("--extra-vars" "data_dir=$HOME/autoware_data") +ansible_args+=("--extra-vars" "ros2_installation_type=ros-base") +ansible_args+=("--extra-vars" "install_devel=false") + +# read amd64 env file and expand ansible arguments +source 'amd64.env' +while read -r env_name; do + ansible_args+=("--extra-vars" "${env_name}=${!env_name}") +done < <(sed "s/=.*//" >/etc/sudoers +gpasswd -a "$user" sudo diff --git a/ansible/playbooks/telegraf.yaml b/ansible/playbooks/telegraf.yaml new file mode 100644 index 00000000000..a490821a23f --- /dev/null +++ b/ansible/playbooks/telegraf.yaml @@ -0,0 +1,4 @@ +- name: Set up Telegraf and InfluxDB v2 + hosts: localhost + roles: + - autoware.dev_env.telegraf diff --git a/ansible/roles/telegraf/README.md b/ansible/roles/telegraf/README.md new file mode 100644 index 00000000000..5355384e72a --- /dev/null +++ b/ansible/roles/telegraf/README.md @@ -0,0 +1,27 @@ +# telegraf + +This role install [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/get-started/) and [Telegraf](https://docs.influxdata.com/telegraf/v1/) to collect system metrics. + +After installing telegraf and influxdb2, we need to manually make an API token and copy it to the `/etc/telegraf/telegraf.conf`. + +## Create Organization + +When accessing the InfluxDB UI for the first time, you need to create an organization and a backet. Enter as follows. + +![](./files/create-org.png) + +## Generate API token + +Next, move to the `Load Data` tab, click the `GENERATE API TOKEN button`, and generate the API token. + + + +![](./files/load-data.png) + +![](./files/generate-api-token.png) + +## Copy API token and restart Telegraf + +Paste the obtained API token into the empty string part of `token = ""` in `/etc/telegraf/telegraf.conf`. + + diff --git a/ansible/roles/telegraf/defaults/main.yaml b/ansible/roles/telegraf/defaults/main.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ansible/roles/telegraf/files/create-org.png b/ansible/roles/telegraf/files/create-org.png new file mode 100644 index 00000000000..a286a54883c Binary files /dev/null and b/ansible/roles/telegraf/files/create-org.png differ diff --git a/ansible/roles/telegraf/files/generate-api-token.png b/ansible/roles/telegraf/files/generate-api-token.png new file mode 100644 index 00000000000..4b2bb26596d Binary files /dev/null and b/ansible/roles/telegraf/files/generate-api-token.png differ diff --git a/ansible/roles/telegraf/files/get_telegraf_proccpu_json.sh b/ansible/roles/telegraf/files/get_telegraf_proccpu_json.sh new file mode 100755 index 00000000000..bd70eef20c7 --- /dev/null +++ b/ansible/roles/telegraf/files/get_telegraf_proccpu_json.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +SAMPLING_SEC=5 + +echo "{" +pidstat -u -h -l "${SAMPLING_SEC}" 1 | + tail -n +4 | + awk '{ cpu=$8; $1=$2=$3=$4=$5=$6=$7=$8=$9=""; print cpu,$0 }' | + sort -n | + while read -r cpu cmd; do + if [[ ${cpu%%.*} -le 0 ]]; then + continue + fi + cmd="${cmd// /_}" + cmd="${cmd//=/_}" + cmd="${cmd:0:50}" + echo "\"${cmd}\":${cpu}," + done +echo '"z":0' +echo "}" diff --git a/ansible/roles/telegraf/files/get_telegraf_procmem_json.sh b/ansible/roles/telegraf/files/get_telegraf_procmem_json.sh new file mode 100755 index 00000000000..dd513aa3781 --- /dev/null +++ b/ansible/roles/telegraf/files/get_telegraf_procmem_json.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "{" +ps -ax --format "rss command" | + while read -r rss cmd; do + if [[ $rss -lt 30000 ]]; then + continue + fi + cmd="${cmd// /_}" + cmd="${cmd//=/_}" + cmd="${cmd:0:50}" + echo "\"${cmd}\":${rss}," + done +echo '"z":0' +echo "}" diff --git a/ansible/roles/telegraf/files/load-data.png b/ansible/roles/telegraf/files/load-data.png new file mode 100644 index 00000000000..7094a0378ce Binary files /dev/null and b/ansible/roles/telegraf/files/load-data.png differ diff --git a/ansible/roles/telegraf/files/telegraf.conf b/ansible/roles/telegraf/files/telegraf.conf new file mode 100644 index 00000000000..9593f3f10c1 --- /dev/null +++ b/ansible/roles/telegraf/files/telegraf.conf @@ -0,0 +1,60 @@ +[global_tags] + +[agent] + interval = "10s" + round_interval = true + metric_batch_size = 1000 + metric_buffer_limit = 10000 + collection_jitter = "0s" + flush_interval = "10s" + flush_jitter = "0s" + precision = "0s" + hostname = "" + omit_hostname = false + +[[outputs.influxdb_v2]] + urls = ["http://127.0.0.1:8086"] + # Attach the access token. See also https://docs.influxdata.com/influxdb/cloud/admin/tokens/create-token/#manage-tokens-in-the-influxdb-ui + token = "" + organization = "autowarefoundation" + bucket = "autoware" + timeout = "5s" + user_agent = "telegraf" + +[[inputs.cpu]] + percpu = true + totalcpu = true + collect_cpu_time = false + report_active = false + core_tags = false + +[[inputs.disk]] + ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] + +[[inputs.diskio]] + +[[inputs.kernel]] + +[[inputs.mem]] + +[[inputs.processes]] + +[[inputs.swap]] + +[[inputs.system]] + +[[inputs.exec]] + commands = ["/opt/autoware/bin/get_telegraf_proccpu_json.sh"] + timeout = "10s" + data_format = "json" + name_suffix = "_proccpu" + +[[inputs.exec]] + commands = ["/opt/autoware/bin/get_telegraf_procmem_json.sh"] + timeout = "5s" + data_format = "json" + name_suffix = "_procmem" + +[[inputs.net]] + +[[inputs.nvidia_smi]] diff --git a/ansible/roles/telegraf/handlers/main.yaml b/ansible/roles/telegraf/handlers/main.yaml new file mode 100644 index 00000000000..854c7d99027 --- /dev/null +++ b/ansible/roles/telegraf/handlers/main.yaml @@ -0,0 +1,4 @@ +- name: Restart telegraf + ansible.builtin.systemd: + name: telegraf + state: restarted diff --git a/ansible/roles/telegraf/meta/main.yaml b/ansible/roles/telegraf/meta/main.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ansible/roles/telegraf/tasks/main.yaml b/ansible/roles/telegraf/tasks/main.yaml new file mode 100644 index 00000000000..e6cc9a3170e --- /dev/null +++ b/ansible/roles/telegraf/tasks/main.yaml @@ -0,0 +1,136 @@ +- name: Download influxdata-archive_compat.key + become: true + ansible.builtin.get_url: + url: https://repos.influxdata.com/influxdata-archive_compat.key + dest: /tmp/influxdata-archive_compat.key + mode: 0755 + +- name: Verify the checksum of the key file + ansible.builtin.command: sha256sum -c + args: + chdir: /tmp + stdin: 393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key + register: checksum_result + failed_when: checksum_result.rc != 0 + changed_when: false + +- name: Check if GPG key is already converted + ansible.builtin.stat: + path: /tmp/influxdata-archive_compat.gpg + register: gpg_key_stat + +- name: Convert the key to gpg format + ansible.builtin.command: + cmd: gpg --dearmor -o /tmp/influxdata-archive_compat.gpg /tmp/influxdata-archive_compat.key + become: true + when: not gpg_key_stat.stat.exists + changed_when: false + +- name: Check if GPG key is already moved + ansible.builtin.stat: + path: /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg + register: moved_key_stat + +- name: Move the gpg key to trusted.gpg.d + ansible.builtin.command: + cmd: mv /tmp/influxdata-archive_compat.gpg /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg + become: true + when: not moved_key_stat.stat.exists + changed_when: false + +- name: Add InfluxData repository + become: true + ansible.builtin.apt_repository: + repo: deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main + state: present + filename: influxdata.list + +- name: Update apt cache + become: true + ansible.builtin.apt: + update_cache: true + cache_valid_time: 3600 + +- name: Install InfluxDB v2 + become: true + ansible.builtin.apt: + name: influxdb2 + state: present + +- name: Install InfluxDB v2 CLI + become: true + ansible.builtin.apt: + name: influxdb2-cli + state: present + +- name: Install Telegraf + become: true + ansible.builtin.apt: + name: telegraf + state: present + +- name: Create telegraf_binary directory + ansible.builtin.file: + path: /opt/autoware/bin + state: directory + mode: 0755 + become: true + +- name: Copy get_telegraf_proccpu_json.sh to /opt/autoware/bin + become: true + ansible.builtin.copy: + src: "{{ role_path }}/files/get_telegraf_proccpu_json.sh" + dest: /opt/autoware/bin/get_telegraf_proccpu_json.sh + owner: root + group: root + mode: 0755 + +- name: Copy get_telegraf_procmem_json.sh to /opt/autoware/bin + become: true + ansible.builtin.copy: + src: "{{ role_path }}/files/get_telegraf_procmem_json.sh" + dest: /opt/autoware/bin/get_telegraf_procmem_json.sh + owner: root + group: root + mode: 0755 + +- name: Copy telegraf.conf to /opt/autoware/bin + become: true + ansible.builtin.copy: + src: "{{ role_path }}/files/telegraf.conf" + dest: /etc/telegraf/telegraf.conf + owner: root + group: root + mode: 0644 + backup: true + notify: + - Restart telegraf + +- name: Ensure telegraf is running and enabled + become: true + ansible.builtin.systemd: + name: telegraf + enabled: true + state: started + +- name: Ensure InfluxDB service is running + become: true + ansible.builtin.service: + name: influxdb + state: started + enabled: true + +- name: Check if InfluxDB is already set up + become: true + ansible.builtin.command: + cmd: influx setup --bucket-status + register: influx_setup_status + ignore_errors: true + changed_when: false + +- name: Set up influxDB v2 + become: true + ansible.builtin.command: + cmd: influx setup -f --name default --username autoware --password autoware --token autowaretoken --org autowarefoundation --bucket autoware --retention 0 + when: influx_setup_status.rc != 0 + changed_when: false diff --git a/docker/Dockerfile b/docker/Dockerfile index edb8d78ba7c..bc2917ca949 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -65,9 +65,6 @@ RUN rosdep update && rosdep keys --ignore-src --from-paths src \ COPY src/universe/external /autoware/src/universe/external COPY src/universe/autoware.universe/common /autoware/src/universe/autoware.universe/common -# TODO(youtalk): Remove COPYs when https://github.com/autowarefoundation/autoware.universe/issues/8695 is resolved -COPY src/universe/autoware.universe/simulator/dummy_perception_publisher /autoware/src/universe/autoware.universe/simulator/dummy_perception_publisher -COPY src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils /autoware/src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils RUN rosdep keys --ignore-src --from-paths src \ | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ | grep -v '^#' \ @@ -110,6 +107,39 @@ RUN rosdep keys --ignore-src --from-paths src \ | sort \ > /rosdep-universe-localization-mapping-depend-packages.txt \ && cat /rosdep-universe-localization-mapping-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-localization-mapping-exec-depend-packages.txt \ + && cat /rosdep-universe-localization-mapping-exec-depend-packages.txt + +FROM rosdep-depend AS rosdep-universe-planning-control-depend +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO + +COPY src/universe/autoware.universe/control /autoware/src/universe/autoware.universe/control +COPY src/universe/autoware.universe/planning /autoware/src/universe/autoware.universe/planning +# TODO(youtalk): Remove COPYs when https://github.com/autowarefoundation/autoware.universe/issues/8805 is resolved +COPY src/universe/autoware.universe/map/map_loader /autoware/src/universe/autoware.universe/map/map_loader +COPY src/universe/autoware.universe/map/autoware_map_projection_loader /autoware/src/universe/autoware.universe/map/autoware_map_projection_loader +COPY src/universe/autoware.universe/sensing/autoware_pcl_extensions /autoware/src/universe/autoware.universe/sensing/autoware_pcl_extensions +COPY src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor /autoware/src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor +RUN rosdep keys --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | 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"] @@ -190,9 +220,6 @@ RUN --mount=type=ssh \ # hadolint ignore=SC1091 RUN --mount=type=cache,target=${CCACHE_DIR} \ --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/common,target=/autoware/src/universe/autoware.universe/common \ - # TODO(youtalk): Remove --mount options when https://github.com/autowarefoundation/autoware.universe/issues/8695 is resolved - --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/simulator/dummy_perception_publisher,target=/autoware/src/universe/autoware.universe/simulator/dummy_perception_publisher \ - --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils,target=/autoware/src/universe/autoware.universe/vehicle/autoware_vehicle_info_utils \ --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/external,target=/autoware/src/universe/external \ source /opt/ros/"$ROS_DISTRO"/setup.bash \ && source /opt/autoware/setup.bash \ @@ -270,6 +297,40 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \ && du -sh ${CCACHE_DIR} && ccache -s \ && rm -rf /autoware/build +FROM universe-common-devel AS universe-planning-control-devel +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Install rosdep dependencies +COPY --from=rosdep-universe-planning-control-depend /rosdep-universe-planning-control-depend-packages.txt /tmp/rosdep-universe-planning-control-depend-packages.txt +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + apt-get update \ + && cat /tmp/rosdep-universe-planning-control-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/control,target=/autoware/src/universe/autoware.universe/control \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/planning,target=/autoware/src/universe/autoware.universe/planning \ + # TODO(youtalk): Remove --mount options when https://github.com/autowarefoundation/autoware.universe/issues/8805 is resolved + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/map/map_loader,target=/autoware/src/universe/autoware.universe/map/map_loader \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/map/autoware_map_projection_loader,target=/autoware/src/universe/autoware.universe/map/autoware_map_projection_loader \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/sensing/autoware_pcl_extensions,target=/autoware/src/universe/autoware.universe/sensing/autoware_pcl_extensions \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor,target=/autoware/src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor \ + source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && colcon build --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ + --mixin release compile-commands ccache \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build + ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] @@ -288,16 +349,15 @@ RUN --mount=type=ssh \ COPY --from=universe-sensing-perception-devel /opt/autoware /opt/autoware COPY --from=universe-localization-mapping-devel /opt/autoware /opt/autoware +COPY --from=universe-planning-control-devel /opt/autoware /opt/autoware # hadolint ignore=SC1091 RUN --mount=type=cache,target=${CCACHE_DIR} \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/launcher,target=/autoware/src/launcher \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/param,target=/autoware/src/param \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/sensor_component,target=/autoware/src/sensor_component \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/sensor_kit,target=/autoware/src/sensor_kit \ - --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/control,target=/autoware/src/universe/autoware.universe/control \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/evaluator,target=/autoware/src/universe/autoware.universe/evaluator \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/launch,target=/autoware/src/universe/autoware.universe/launch \ - --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/planning,target=/autoware/src/universe/autoware.universe/planning \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/simulator,target=/autoware/src/universe/autoware.universe/simulator \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/system,target=/autoware/src/universe/autoware.universe/system \ --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/tools,target=/autoware/src/universe/autoware.universe/tools \ @@ -338,7 +398,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* @@ -352,6 +412,74 @@ RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] +FROM base AS universe-localization-mapping +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-localization-mapping-depend /rosdep-universe-localization-mapping-exec-depend-packages.txt /tmp/rosdep-universe-localization-mapping-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-localization-mapping-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-localization-mapping-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-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 @@ -372,7 +500,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* diff --git a/docker/Dockerfile.svg b/docker/Dockerfile.svg index 6975aaaf038..a54e635be43 100644 --- a/docker/Dockerfile.svg +++ b/docker/Dockerfile.svg @@ -4,264 +4,349 @@ - - + + G - + cluster_legend - + key -FROM ...  -COPY --from=...  -RUN --mount=(.*)from=...  +FROM ...  +COPY --from=...  +RUN --mount=(.*)from=...  key2 -  -  -  +  +  +  key:e->key2:w - - + + key:e->key2:w - - + + key:e->key2:w - - + + external_image_0 - -$BASE_IMAGE + +$BASE_IMAGE stage_0 - -base + +base external_image_0->stage_0 - - + + stage_1 - -rosdep-depend + +rosdep-depend external_image_0->stage_1 - - + + - + -stage_5 - -core-devel +stage_6 + +core-devel - + -stage_0->stage_5 - - +stage_0->stage_6 + + - + -stage_10 - -universe-sensing-perception +stage_12 + +universe-sensing-perception - + -stage_0->stage_10 - - +stage_0->stage_12 + + + - + -stage_11 - -universe +stage_13 + +universe-localization-mapping - + -stage_0->stage_11 - - - +stage_0->stage_13 + - - -stage_1->stage_5 - - + + +stage_14 + +universe-planning-control + + + +stage_0->stage_14 + + + + + + +stage_15 + +universe + + + +stage_0->stage_15 + + + + + +stage_1->stage_6 + + - + stage_2 - -rosdep-universe-sensing-perception-depend + +rosdep-universe-sensing-perception-depend - + stage_1->stage_2 - - - + + - + stage_3 - -rosdep-universe-localization-mapping-depend + +rosdep-universe-localization-mapping-depend - + stage_1->stage_3 - - + + - + stage_4 - -rosdep-universe-depend + +rosdep-universe-planning-control-depend - + stage_1->stage_4 - - + + - - -stage_6 - -universe-common-devel + + +stage_5 + +rosdep-universe-depend - + -stage_1->stage_6 - - - - - -stage_5->stage_6 - - - - - -stage_2->stage_10 - - +stage_1->stage_5 + + + - + stage_7 - -universe-sensing-perception-devel + +universe-common-devel + + + +stage_1->stage_7 + + + + + +stage_6->stage_7 + + - - -stage_2->stage_7 - - + + +stage_2->stage_12 + + - + stage_8 - -universe-localization-mapping-devel + +universe-sensing-perception-devel - - -stage_3->stage_8 - - + + +stage_2->stage_8 + + - - -stage_4->stage_11 - - + + +stage_3->stage_13 + + + - + stage_9 - -universe-devel + +universe-localization-mapping-devel - + -stage_4->stage_9 - - +stage_3->stage_9 + + - - -stage_6->stage_7 - - + + +stage_4->stage_14 + + - - -stage_6->stage_8 - - + + +stage_10 + +universe-planning-control-devel - - -stage_6->stage_9 - - + + +stage_4->stage_10 + + - - -stage_7->stage_10 - - + + +stage_5->stage_15 + + + + + +stage_11 + +universe-devel + + + +stage_5->stage_11 + + + + + +stage_7->stage_8 + + - + stage_7->stage_9 - - + + - - -stage_8->stage_9 - - + + +stage_7->stage_10 + + + + + +stage_7->stage_11 + + + + + +stage_8->stage_12 + + + + + +stage_8->stage_11 + + + + + +stage_9->stage_13 + + - + stage_9->stage_11 - - + + + + + +stage_10->stage_14 + + + + + +stage_10->stage_11 + + + + + +stage_11->stage_15 + + diff --git a/docker/README.md b/docker/README.md index 91f959b6197..3d600ccfe30 100644 --- a/docker/README.md +++ b/docker/README.md @@ -61,6 +61,21 @@ This stage installs the dependency packages based on `/rosdep-universe-localizat - `universe/autoware.universe/localization` - `universe/autoware.universe/map` +### `universe-localization-mapping` + +This stage is a Autoware Universe Localization/Mapping runtime container. It only includes the dependencies given by `/rosdep-universe-localization-mapping-exec-depend-packages.txt` and the binaries built in the `universe-localization-mapping-devel` stage. + +### `universe-planning-control-devel` + +This stage installs the dependency packages based on `/rosdep-universe-planning-control-depend-packages.txt` and build the packages under the following directories of `autoware.repos`. + +- `universe/autoware.universe/control` +- `universe/autoware.universe/planning` + +### `universe-planning-control` + +This stage is a Autoware Universe Planning/Control runtime container. It only includes the dependencies given by `/rosdep-universe-planning-control-exec-depend-packages.txt` and the binaries built in the `universe-planning-control-devel` stage. + ### `universe-devel` This stage installs the dependency packages based on `/rosdep-universe-depend-packages.txt` and build the remaining packages of `autoware.repos`: @@ -69,10 +84,8 @@ This stage installs the dependency packages based on `/rosdep-universe-depend-pa - `param` - `sensor_component` - `sensor_kit` -- `universe/autoware.universe/control` - `universe/autoware.universe/evaluator` - `universe/autoware.universe/launch` -- `universe/autoware.universe/planning` - `universe/autoware.universe/simulator` - `universe/autoware.universe/system` - `universe/autoware.universe/tools` diff --git a/docker/build.sh b/docker/build.sh index 4824a88e11b..b962137b79c 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -59,7 +59,7 @@ set_cuda_options() { # Set build options set_build_options() { if [ "$option_devel_only" = "true" ]; then - targets=("devel") + targets=("universe-devel") else targets=() fi @@ -132,9 +132,9 @@ build_images() { --set "*.args.BASE_IMAGE=$base_image" \ --set "*.args.SETUP_ARGS=$setup_args" \ --set "*.args.LIB_DIR=$lib_dir" \ - --set "base.tags=ghcr.io/autowarefoundation/autoware:latest-base" \ - --set "devel.tags=ghcr.io/autowarefoundation/autoware:latest-devel$image_name_suffix" \ - --set "runtime.tags=ghcr.io/autowarefoundation/autoware:latest-runtime$image_name_suffix" \ + --set "base.tags=ghcr.io/autowarefoundation/autoware:base" \ + --set "universe-devel.tags=ghcr.io/autowarefoundation/autoware:universe-devel$image_name_suffix" \ + --set "universe.tags=ghcr.io/autowarefoundation/autoware:universe$image_name_suffix" \ "${targets[@]}" set +x } diff --git a/docker/docker-bake.hcl b/docker/docker-bake.hcl index 4360c907329..cc544f2409e 100644 --- a/docker/docker-bake.hcl +++ b/docker/docker-bake.hcl @@ -4,6 +4,10 @@ group "default" { "core-devel", "universe-sensing-perception-devel", "universe-sensing-perception", + "universe-localization-mapping-devel", + "universe-localization-mapping", + "universe-planning-control-devel", + "universe-planning-control", "universe-devel", "universe" ] @@ -14,6 +18,10 @@ target "docker-metadata-action-base" {} target "docker-metadata-action-core-devel" {} target "docker-metadata-action-universe-sensing-perception-devel" {} target "docker-metadata-action-universe-sensing-perception" {} +target "docker-metadata-action-universe-localization-mapping-devel" {} +target "docker-metadata-action-universe-localization-mapping" {} +target "docker-metadata-action-universe-planning-control-devel" {} +target "docker-metadata-action-universe-planning-control" {} target "docker-metadata-action-universe-devel" {} target "docker-metadata-action-universe" {} @@ -41,6 +49,30 @@ target "universe-sensing-perception" { target = "universe-sensing-perception" } +target "universe-localization-mapping-devel" { + inherits = ["docker-metadata-action-universe-localization-mapping-devel"] + dockerfile = "docker/Dockerfile" + target = "universe-localization-mapping-devel" +} + +target "universe-localization-mapping" { + inherits = ["docker-metadata-action-universe-localization-mapping"] + dockerfile = "docker/Dockerfile" + target = "universe-localization-mapping" +} + +target "universe-planning-control-devel" { + inherits = ["docker-metadata-action-universe-planning-control-devel"] + dockerfile = "docker/Dockerfile" + target = "universe-planning-control-devel" +} + +target "universe-planning-control" { + inherits = ["docker-metadata-action-universe-planning-control"] + dockerfile = "docker/Dockerfile" + target = "universe-planning-control" +} + target "universe-devel" { inherits = ["docker-metadata-action-universe-devel"] dockerfile = "docker/Dockerfile" diff --git a/docker/run.sh b/docker/run.sh index 17be654d8cc..a1c920906b6 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -91,7 +91,7 @@ parse_arguments() { set_variables() { if [ "$option_devel" = "true" ]; then # Set image based on option - IMAGE="ghcr.io/autowarefoundation/autoware:latest-devel" + IMAGE="ghcr.io/autowarefoundation/autoware:universe-devel" # Set workspace path, if not provided use the current directory if [ "$WORKSPACE_PATH" = "" ]; then @@ -113,12 +113,12 @@ set_variables() { fi else # Set image based on option - IMAGE="ghcr.io/autowarefoundation/autoware:latest-runtime" + IMAGE="ghcr.io/autowarefoundation/autoware:universe" # Set map path if [ "$MAP_PATH" = "" ]; then echo -e "\n------------------------------------------------------------" - echo -e "${RED}Note:${NC} The --map-path option is mandatory for the runtime. For development environment with shell access, use --devel option." + echo -e "${RED}Note:${NC} The --map-path option is mandatory for the universe(runtime image). For development environment with shell access, use --devel option." echo -e "------------------------------------------------------------" exit 1 else