Download Dockerfile from Beijuka/ocr: direct link, hf CLI and curl.
- Browser
- Download file 796 Bytes
-
https://huggingface.co/spaces/Beijuka/ocr/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Beijuka/ocr/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Beijuka/ocr/resolve/main/Dockerfile
796 Bytes
| FROM python:3.10-slim | |
| # Install system packages required for OCR (Tesseract, poppler for PDF tools) | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends \ | |
| tesseract-ocr \ | |
| libtesseract-dev \ | |
| libleptonica-dev \ | |
| pkg-config \ | |
| poppler-utils \ | |
| build-essential \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy and install Python dependencies | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN python -m pip install --upgrade pip && \ | |
| pip install --no-cache-dir -r /tmp/requirements.txt | |
| # Copy application | |
| COPY . /app | |
| WORKDIR /app | |
| # Expose default port (Spaces will set PORT env var) | |
| ENV PORT=7860 | |
| # Run Streamlit app on container start | |
| CMD bash -lc "streamlit run streamlit_app.py --server.port ${PORT} --server.address 0.0.0.0" | |