Spaces:
Sleeping
Sleeping
Download Dockerfile from satvaSolutions/invoice-ocr-api: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/spaces/satvaSolutions/invoice-ocr-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/satvaSolutions/invoice-ocr-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/satvaSolutions/invoice-ocr-api/resolve/main/Dockerfile
770 Bytes
| FROM python:3.9-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| ffmpeg \ | |
| tesseract-ocr \ | |
| poppler-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set environment variables to avoid permission issues | |
| ENV MPLCONFIGDIR=/tmp/matplotlib | |
| ENV YOLO_CONFIG_DIR=/tmp/Ultralytics | |
| ENV XDG_CACHE_HOME=/tmp | |
| ENV FONTCONFIG_PATH=/tmp | |
| RUN mkdir -p /tmp/matplotlib /tmp/ultralytics /tmp/fontconfig | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy project files | |
| COPY . . | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| # Expose Hugging Face Spaces default port | |
| EXPOSE 7860 | |
| # Run FastAPI app with Uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |