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

fix(docker): update build script with respect to multi-container design #5571

Merged
merged 6 commits into from
Dec 23, 2024
Merged
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
29 changes: 21 additions & 8 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ set_cuda_options() {
# Set build options
set_build_options() {
if [ "$option_devel_only" = "true" ]; then
targets=("universe-devel")
target="universe-devel"
else
targets=()
target="universe"
fi
}

Expand Down Expand Up @@ -121,21 +121,34 @@ build_images() {
echo "Setup args: $setup_args"
echo "Lib dir: $lib_dir"
echo "Image name suffix: $image_name_suffix"
echo "Targets: ${targets[*]}"
echo "Target: $target"

set -x
docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/docker-bake.hcl" \
docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/docker-bake-base.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 "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 "base.tags=ghcr.io/autowarefoundation/autoware-base:latest" \
--set "base-cuda.tags=ghcr.io/autowarefoundation/autoware-base:cuda-latest"
docker buildx bake --load --progress=plain -f "$SCRIPT_DIR/docker-bake.hcl" -f "$SCRIPT_DIR/docker-bake-cuda.hcl" \
--set "*.context=$WORKSPACE_ROOT" \
--set "*.ssh=default" \
--set "*.platform=$platform" \
--set "*.args.ROS_DISTRO=$rosdistro" \
--set "*.args.BASE_IMAGE=$base_image" \
--set "*.args.AUTOWARE_BASE_IMAGE=$autoware_base_image" \
--set "*.args.AUTOWARE_BASE_CUDA_IMAGE=$autoware_base_cuda_image" \
--set "*.args.SETUP_ARGS=$setup_args" \
--set "*.args.LIB_DIR=$lib_dir" \
--set "universe-devel.tags=ghcr.io/autowarefoundation/autoware:universe-devel" \
--set "universe-devel-cuda.tags=ghcr.io/autowarefoundation/autoware:universe-devel-cuda" \
--set "universe.tags=ghcr.io/autowarefoundation/autoware:universe" \
--set "universe-cuda.tags=ghcr.io/autowarefoundation/autoware:universe-cuda" \
"$target$image_name_suffix"
set +x
}

Expand Down
Loading