| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY models.py environment.py app.py openenv.yaml README.md ./ | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ | |
| CMD python -c "import requests; requests.get('http://localhost:7860/health').raise_for_status()" | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |