Spaces:
Sleeping
Sleeping
Download Dockerfile from Waseem-k/AI-Reverse_Face_Search: direct link, hf CLI and curl.
- Browser
- Download file 842 Bytes
-
https://huggingface.co/spaces/Waseem-k/AI-Reverse_Face_Search/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Waseem-k/AI-Reverse_Face_Search/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Waseem-k/AI-Reverse_Face_Search/resolve/main/Dockerfile
842 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # 1. Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| curl \ | |
| git \ | |
| libopenblas-dev \ | |
| liblapack-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. CRITICAL FIX: Limit build to 1 thread to prevent OOM (Exit 137) | |
| ENV CMAKE_BUILD_PARALLEL_LEVEL=1 | |
| # 3. Install dlib separately first | |
| RUN pip3 install --no-cache-dir dlib | |
| # 4. Install remaining dependencies | |
| COPY requirements.txt ./ | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # 5. Copy source code & startapplicatio.sh script | |
| COPY src/ ./src/ | |
| COPY startapplication.sh ./ | |
| # Make the script executable | |
| RUN chmod +x startapplication.sh | |
| # 6. Hugging Face Spaces Config | |
| EXPOSE 8501 | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health | |
| ENTRYPOINT ["./startapplication.sh"] |