Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV PORT=7860 | |
| WORKDIR /app | |
| # System dependencies required by OpenCV + Torch | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Python dependencies | |
| COPY requirements.txt . | |
| RUN python -m pip install --upgrade pip setuptools wheel && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Hugging Face required port | |
| EXPOSE 7860 | |
| # Start Flask app | |
| CMD ["python", "run.py"] | |