Spaces:
Running on Zero
Running on Zero
Download Dockerfile from shareefmx/pdf-knowledge-assistant: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/spaces/shareefmx/pdf-knowledge-assistant/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/shareefmx/pdf-knowledge-assistant/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/shareefmx/pdf-knowledge-assistant/resolve/main/Dockerfile
773 Bytes
| # Use official lightweight Python 3.12 runtime | |
| FROM python:3.12-slim | |
| # Prevent Python from writing .pyc files and enable unbuffered logging | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PORT=7860 | |
| # Install minimal OS dependencies for PDF processing and math libraries | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application source code | |
| COPY . . | |
| # Ensure storage directories exist | |
| RUN mkdir -p data/uploads data/processed data/vectorstore | |
| # Expose Hugging Face Space port | |
| EXPOSE 7860 | |
| # Run Gradio application | |
| CMD ["python", "app.py"] | |