Spaces:
Sleeping
Sleeping
Download Dockerfile from valentinj/face-quality-analysis: direct link, hf CLI and curl.
- Browser
- Download file 727 Bytes
-
https://huggingface.co/spaces/valentinj/face-quality-analysis/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/valentinj/face-quality-analysis/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/valentinj/face-quality-analysis/resolve/main/Dockerfile
727 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Set environment variables for writable directories | |
| ENV INSIGHTFACE_HOME=/tmp/.insightface | |
| ENV MPLCONFIGDIR=/tmp/matplotlib | |
| # Install system dependencies for OpenCV and InsightFace | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| g++ \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libgomp1 \ | |
| libgthread-2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| libfontconfig1 \ | |
| libice6 \ | |
| mesa-utils \ | |
| wget \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app ./app | |
| # (Optional) expose port 7860 or 80 | |
| EXPOSE 80 | |
| CMD ["fastapi", "run", "app/main.py", "--host", "0.0.0.0", "--port", "7860"] | |