FROM python:3.12-slim

RUN apt-get update \
 && apt-get install -y --no-install-recommends openssh-client curl ca-certificates \
 && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY pyproject.toml /app/
COPY app /app/app
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

COPY models.yaml /app/models.yaml

RUN pip install --no-cache-dir -e .

ENV BIND_PORT=9999
EXPOSE 9999
ENTRYPOINT ["/app/entrypoint.sh"]
