Spaces:
Sleeping
Sleeping
Download Dockerfile from ozsparkhub/pdf-table-extract-api: direct link, hf CLI and curl.
- Browser
- Download file 630 Bytes
-
https://huggingface.co/spaces/ozsparkhub/pdf-table-extract-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ozsparkhub/pdf-table-extract-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ozsparkhub/pdf-table-extract-api/resolve/main/Dockerfile
630 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| tesseract-ocr \ | |
| tesseract-ocr-eng \ | |
| tesseract-ocr-chi-sim \ | |
| tesseract-ocr-chi-tra \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install Python packages | |
| COPY install_ocr_models.py . | |
| RUN python install_ocr_models.py | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY app.py ocr_support.py ./ | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run FastAPI with uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |