FROM python:3.12-slim

LABEL maintainer="GouthamRajam"
LABEL description="GothOS — provider-agnostic Android AI agent"

# System dependencies
RUN apt-get update -qq \
    && apt-get install -y -qq --no-install-recommends \
        android-tools-adb \
        ffmpeg \
        git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Install Python dependencies first (layer caching)
COPY pyproject.toml ./
RUN pip install --no-cache-dir --upgrade pip \
    && pip install --no-cache-dir -e ".[dev]" || true

# Copy source
COPY . .
RUN pip install --no-cache-dir -e .

# Expose MCP server port (if running in HTTP mode)
EXPOSE 8000

# Default: start the MCP server
ENTRYPOINT ["gothos"]
CMD ["serve"]
