| FROM python:3.10-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Runtime API configuration (OpenAI-compatible): | |
| # - API_BASE_URL is required | |
| # - MODEL_NAME is required | |
| # - API_KEY is canonical auth env var | |
| # - HF_TOKEN and OPENAI_API_KEY are accepted as backward-compatible aliases | |
| EXPOSE 7860 | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=7860 | |
| CMD ["python", "-m", "server.app"] |