| FROM python:3.12-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Cache locations (helpful if you later enable persistent storage) | |
| ENV HF_HOME=/data/.huggingface | |
| ENV TRANSFORMERS_CACHE=/data/.huggingface/transformers | |
| ENV HF_HUB_CACHE=/data/.huggingface/hub | |
| WORKDIR /app | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| COPY server.py /app/server.py | |
| COPY index.html /app/index.html | |
| EXPOSE 7860 | |
| CMD ["python","-m","uvicorn","server:app","--host","0.0.0.0","--port","7860","--log-level","info"] |