Download Dockerfile from DOOM1812/face: direct link, hf CLI and curl.
- Browser
- Download file 954 Bytes
-
https://huggingface.co/spaces/DOOM1812/face/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/DOOM1812/face/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/DOOM1812/face/resolve/main/Dockerfile
954 Bytes
| FROM python:3.11-bullseye | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV MPLCONFIGDIR="/app/matplotlib" | |
| ENV DEEPFACE_HOME="/app/.deepface" | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| libopenblas-dev \ | |
| liblapack-dev \ | |
| libjpeg-dev \ | |
| libpng-dev \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Copy only requirements first (cache-friendly) | |
| COPY requirements.txt /app/ | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Now copy the rest of your application | |
| COPY . /app | |
| # Create necessary directories and permissions | |
| RUN mkdir -p /app/matplotlib /app/.deepface /app/tmp /app/data /app/static && \ | |
| chmod -R 777 /app/.deepface /app/matplotlib /app/tmp /app/data /app/static | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "8"] | |