Spaces:
Sleeping
Sleeping
| # Dockerfile | |
| FROM python:3.11-slim | |
| # Install system packages needed by insightface / opencv | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| wget \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # copy files | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # copy app | |
| COPY . /app | |
| # Expose the port Spaces will forward (7860 is used by Spaces) | |
| EXPOSE 7860 | |
| # Run uvicorn on port 7860 bound to 0.0.0.0 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] |