#!/bin/bash
# setup-agg.sh — aggregator / coordinator node setup.
#
# The aggregator runs the Flower star server (fl.star_server) and, in mesh runs,
# is the metrics collection point. In v0 it needs only the common stack; this
# wrapper exists so role-specific setup (e.g. future server-side secure
# aggregation) has a home.
#
# Usage:  bash setup-agg.sh [true|false|auto] [cuda_tag]
# Install is configurable via FL_CUDA_TAG / FL_NVIDIA_DRIVER / FL_TORCH_SPEC /
# FL_USE_GPU env vars too (see setup-common.sh); args below are forwarded through.
set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

echo "### PROGRESS: [setup-agg] running common setup"
bash "$SCRIPT_DIR/setup-common.sh" "$@"

echo "### PROGRESS: [setup-agg] aggregator ready"
