diff --git a/docker/build.sh b/docker/build.sh index 4ce2c26470..aa2c8ae8ba 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -11,7 +11,7 @@ print_help() { echo " --no-cuda Disable CUDA support" echo " --platform Specify the platform (default: current platform)" echo " --devel-only Build devel image only" - echo " --target Specify the target image" + echo " --target Specify the target image (default: universe or universe-devel if --devel-only is set)" echo "" echo "Note: The --platform option should be one of 'linux/amd64' or 'linux/arm64'." } @@ -65,6 +65,7 @@ set_cuda_options() { set_build_options() { if [ -n "$option_target" ]; then target="$option_target" + image_name_suffix="" else if [ "$option_devel_only" = "true" ]; then target="universe-devel" @@ -158,21 +159,6 @@ build_images() { --set "universe.tags=ghcr.io/autowarefoundation/autoware:universe" \ --set "universe-cuda.tags=ghcr.io/autowarefoundation/autoware:universe-cuda" \ --set "universe-visualization.tags=ghcr.io/autowarefoundation/autoware:universe-visualization" \ - "universe-visualization" - 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 }