Spaces:
Runtime error
Runtime error
Download Dockerfile from Turbiling/PDF_Reader: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/spaces/Turbiling/PDF_Reader/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Turbiling/PDF_Reader/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Turbiling/PDF_Reader/resolve/main/Dockerfile
703 Bytes
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /workspace | |
| # Install system packages | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # ✅ Create writable directories for Chainlit | |
| RUN mkdir -p /workspace/.files /workspace/.chainlit && chmod -R 777 /workspace | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| # Copy app code | |
| COPY . . | |
| # ✅ Set environment variables to writable paths | |
| ENV CHAINLIT_PROJECT_ROOT=/workspace | |
| ENV CHAINLIT_STORAGE_DIR=/workspace/.chainlit | |
| # ✅ Default CMD to run Chainlit app | |
| CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"] | |