Spaces:
Sleeping
Sleeping
Download Dockerfile from randusertry/pdf_analysis: direct link, hf CLI and curl.
- Browser
- Download file 646 Bytes
-
https://huggingface.co/spaces/randusertry/pdf_analysis/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/randusertry/pdf_analysis/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/randusertry/pdf_analysis/resolve/main/Dockerfile
646 Bytes
| FROM python:3.10-slim | |
| # Install light dependencies needed for PDF/Image processing | |
| RUN apt-get update && apt-get install -y \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set up a non-root user (Hugging Face Requirement) | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # Switch to user context | |
| USER user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| # Install Python requirements | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| RUN pip install pymupdf | |
| # Copy your application code | |
| COPY --chown=user . . | |
| # Expose port 7860 for HF Spaces | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |