Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(docker,ci): rename autoware-openadk to autoware and adkit to openadkit #4785

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/base/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "Autoware",
"build": {
"dockerfile": "../Dockerfile",
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware-openadk:latest-devel" }
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel" }
},
"remoteUser": "autoware",
"runArgs": [
"--cap-add=SYS_PTRACE",

Check warning on line 9 in .devcontainer/base/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (PTRACE)
"--security-opt",
"seccomp=unconfined",

Check warning on line 11 in .devcontainer/base/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (seccomp)
"--net=host",
"--volume=/etc/localtime:/etc/localtime:ro"

Check warning on line 13 in .devcontainer/base/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (localtime)

Check warning on line 13 in .devcontainer/base/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (localtime)
],
"customizations": {
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cuda/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"name": "Autoware-cuda",
"build": {
"dockerfile": "../Dockerfile",
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware-openadk:latest-devel-cuda" }
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel-cuda" }
},
"remoteUser": "autoware",
"hostRequirements": {
"gpu": true
},
"runArgs": [
"--cap-add=SYS_PTRACE",

Check warning on line 12 in .devcontainer/cuda/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (PTRACE)
"--security-opt",
"seccomp=unconfined",

Check warning on line 14 in .devcontainer/cuda/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (seccomp)
"--net=host",
"--volume=/etc/localtime:/etc/localtime:ro",

Check warning on line 16 in .devcontainer/cuda/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (localtime)

Check warning on line 16 in .devcontainer/cuda/devcontainer.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (localtime)
"--gpus",
"all"
],
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ runs:
with:
push: ${{ inputs.allow-push == 'true' }}
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
docker/docker-bake.hcl
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
targets: |
Expand All @@ -114,7 +114,7 @@ runs:
with:
push: true
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
docker/docker-bake.hcl
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
Expand All @@ -128,7 +128,7 @@ runs:
with:
push: false
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
docker/docker-bake.hcl
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
Expand Down
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 @@ -50,7 +50,7 @@ jobs:
- name: Build 'autoware-universe'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
bake-target: autoware
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
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 @@ -45,7 +45,7 @@ jobs:
- name: Build 'autoware-universe'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
bake-target: autoware
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: docker-build-and-push-main-self-hosted
on:
push:
tags:
- adkit-v*.*.*
- openadkit-v*.*.*
branches:
- main
schedule:
Expand Down Expand Up @@ -75,10 +75,10 @@ jobs:
mkdir src
vcs import src < autoware.repos

- name: Build 'autoware-openadk'
- name: Build 'Autoware'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
bake-target: autoware
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: docker-build-and-push-main
on:
push:
tags:
- adkit-v*.*.*
- openadkit-v*.*.*
branches:
- main
schedule:
Expand Down Expand Up @@ -70,10 +70,10 @@ jobs:
mkdir src
vcs import src < autoware.repos

- name: Build 'autoware-openadk'
- name: Build 'Autoware'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware-openadk
bake-target: autoware
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-docker-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Combine multi arch images for 'autoware-openadk'
- name: Combine multi arch images for 'Autoware'
uses: ./.github/actions/combine-multi-arch-images
with:
package-name: autoware-openadk
package-name: autoware
File renamed without changes.
14 changes: 7 additions & 7 deletions docker/autoware-openadk/Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WORKDIR /autoware

# Set up base environment
RUN --mount=type=ssh \
./setup-dev-env.sh -y --module base --runtime openadk \
./setup-dev-env.sh -y --module base --runtime openadkit \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache \
&& echo "source /opt/ros/${ROS_DISTRO}/setup.bash" > /etc/bash.bashrc
Expand Down Expand Up @@ -72,7 +72,7 @@ ENV CXX="/usr/lib/ccache/g++"
# cspell: ignore libcu libnv
# Set up development environment
RUN --mount=type=ssh \
./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadk \
./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadkit \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache \
&& find / -name 'libcu*.a' -delete \
Expand Down Expand Up @@ -105,12 +105,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install development tools and artifacts
RUN --mount=type=ssh \
./setup-dev-env.sh -y --module dev-tools openadk \
./setup-dev-env.sh -y --module dev-tools openadkit \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache

# Create entrypoint
COPY docker/autoware-openadk/etc/ros_entrypoint.sh /ros_entrypoint.sh
COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh
RUN chmod +x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]
Expand All @@ -125,7 +125,7 @@ ARG SETUP_ARGS
COPY --from=src-imported /rosdep-exec-depend-packages.txt /tmp/rosdep-exec-depend-packages.txt
# hadolint ignore=SC2002
RUN --mount=type=ssh \
./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers --runtime openadk \
./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-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \
Expand All @@ -143,11 +143,11 @@ RUN --mount=type=ssh \
COPY --from=prebuilt /autoware/install/ /autoware/install/

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

# Create entrypoint
COPY docker/autoware-openadk/etc/ros_entrypoint.sh /ros_entrypoint.sh
COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh
RUN chmod +x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]
10 changes: 5 additions & 5 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ print_help() {
}

SCRIPT_DIR=$(readlink -f "$(dirname "$0")")
WORKSPACE_ROOT="$SCRIPT_DIR/../"
WORKSPACE_ROOT="$SCRIPT_DIR/.."

# Parse arguments
parse_arguments() {
Expand Down Expand Up @@ -111,17 +111,17 @@ build_images() {
echo "Targets: ${targets[*]}"

set -x
docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/autoware-openadk/docker-bake.hcl" \
docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/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.SETUP_ARGS=$setup_args" \
--set "*.args.LIB_DIR=$lib_dir" \
--set "devel.tags=ghcr.io/autowarefoundation/autoware-openadk:latest-devel$image_name_suffix" \
--set "prebuilt.tags=ghcr.io/autowarefoundation/autoware-openadk:latest-prebuilt$image_name_suffix" \
--set "runtime.tags=ghcr.io/autowarefoundation/autoware-openadk:latest-runtime$image_name_suffix" \
--set "devel.tags=ghcr.io/autowarefoundation/autoware:latest-devel$image_name_suffix" \
--set "prebuilt.tags=ghcr.io/autowarefoundation/autoware:latest-prebuilt$image_name_suffix" \
--set "runtime.tags=ghcr.io/autowarefoundation/autoware:latest-runtime$image_name_suffix" \
"${targets[@]}"
set +x
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ target "docker-metadata-action-runtime" {}

target "prebuilt" {
inherits = ["docker-metadata-action-prebuilt"]
dockerfile = "docker/autoware-openadk/Dockerfile"
dockerfile = "docker/Dockerfile"
target = "prebuilt"
}

target "devel" {
inherits = ["docker-metadata-action-devel"]
dockerfile = "docker/autoware-openadk/Dockerfile"
dockerfile = "docker/Dockerfile"
target = "devel"
}

target "runtime" {
inherits = ["docker-metadata-action-runtime"]
dockerfile = "docker/autoware-openadk/Dockerfile"
dockerfile = "docker/Dockerfile"
target = "runtime"
}
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
NC='\033[0m' # No Color

SCRIPT_DIR=$(readlink -f "$(dirname "$0")")
WORKSPACE_ROOT="$SCRIPT_DIR/../"
WORKSPACE_ROOT="$SCRIPT_DIR/.."
source "$WORKSPACE_ROOT/amd64.env"
if [ "$(uname -m)" = "aarch64" ]; then
source "$WORKSPACE_ROOT/arm64.env"
Expand Down Expand Up @@ -124,9 +124,9 @@

# Set image based on option
if [ "$option_devel" == "true" ]; then
IMAGE="ghcr.io/autowarefoundation/autoware-openadk:latest-devel"
IMAGE="ghcr.io/autowarefoundation/autoware:latest-devel"
else
IMAGE="ghcr.io/autowarefoundation/autoware-openadk:latest-runtime"
IMAGE="ghcr.io/autowarefoundation/autoware:latest-runtime"
fi
}

Expand Down Expand Up @@ -168,7 +168,7 @@
# Launch the container
set -x
docker run -it --rm --net=host ${GPU_FLAG} ${USER_ID} ${MOUNT_X} \
-e XAUTHORITY=${XAUTHORITY} -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -e NVIDIA_DRIVER_CAPABILITIES=all -v /etc/localtime:/etc/localtime:ro \

Check warning on line 171 in docker/run.sh

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (localtime)
${WORKSPACE} ${DATA} ${MAP} ${IMAGE} \
${LAUNCH_CMD}
}
Expand Down
Loading