Download Dockerfile from guardianrobot/screencomply_documents: direct link, hf CLI and curl.
- Browser
- Download file 899 Bytes
-
https://huggingface.co/spaces/guardianrobot/screencomply_documents/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/guardianrobot/screencomply_documents/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/guardianrobot/screencomply_documents/resolve/main/Dockerfile
899 Bytes
| FROM python:3.11-slim | |
| # System deps needed by pypdf, python-docx, torch | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python dependencies (cached as a separate layer) | |
| COPY backend/requirements.txt ./requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy source | |
| COPY backend/ ./backend/ | |
| COPY frontend/ ./frontend/ | |
| # Runtime directories | |
| RUN mkdir -p uploads results .cache | |
| # HF Spaces requires port 7860 and runs containers as uid 1000 | |
| RUN useradd -m -u 1000 user && chown -R user:user /app | |
| USER user | |
| # PYTHONPATH=/app lets `from backend.X import ...` resolve correctly | |
| ENV PORT=7860 \ | |
| HOST=0.0.0.0 \ | |
| DEBUG=False \ | |
| PYTHONPATH=/app \ | |
| HF_HOME=/app/.cache/huggingface \ | |
| MODEL_CACHE_DIR=/app/.cache/models | |
| EXPOSE 7860 | |
| CMD ["python", "backend/main.py"] | |