# MAESTRO-SSOT — Reproducible Experiment Environment
# Usage:
#   docker build -t maestro-ssot .
#   docker run -it --rm -v $(pwd)/output:/output maestro-ssot maestro benchmark --output-dir /output

FROM python:3.12-slim

# Install system deps
RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    curl \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

WORKDIR /app

# Copy project files
COPY pyproject.toml uv.lock ./
COPY libs/ ./libs/
COPY src/ ./src/
COPY tests/ ./tests/
COPY benchmarks/ ./benchmarks/
COPY scripts/ ./scripts/
COPY configs/ ./configs/
COPY docs/ ./docs/
COPY README.md ./

# Install dependencies
RUN uv sync --frozen --no-dev

# Create default global config
RUN mkdir -p /root/.maestro && \
    echo '[llm]\nprovider = "anthropic"\nmodel = "claude-sonnet-4-20250514"\nthinking = true\n' > /root/.maestro/config.toml

ENV PATH="/app/.venv/bin:$PATH"

# Default: show help
ENTRYPOINT ["maestro"]
CMD ["--help"]
