Spaces:
Runtime error
Runtime error
Download Dockerfile from Rakshitjan/generate_pdf_python: direct link, hf CLI and curl.
- Browser
- Download file 610 Bytes
-
https://huggingface.co/spaces/Rakshitjan/generate_pdf_python/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Rakshitjan/generate_pdf_python/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Rakshitjan/generate_pdf_python/resolve/main/Dockerfile
610 Bytes
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| python3-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Create necessary directories | |
| RUN mkdir -p /app/output | |
| # Expose port | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| # Run the application | |
| CMD ["python", "main.py"] |