Spaces:
Running
Running
Download Dockerfile from phucsd/cham-ocr-studio: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/phucsd/cham-ocr-studio/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/phucsd/cham-ocr-studio/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/phucsd/cham-ocr-studio/resolve/main/Dockerfile
1.16 kB
| FROM python:3.11-slim | |
| # Rebuild timestamp: 2026-08-01T09:26:20Z - Re-assign components using true_core_coords for full line bbox height [30..78] | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install system dependencies required for OpenCV, PaddlePaddle, and OpenMP | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libgomp1 \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install python packages | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Force cache bust for updated app code & Cham-SVTR V24 default model | |
| RUN echo "Cache bust 2026-09-16T11:40:00Z - Temporarily hide V25, set V24 as default model" | |
| # Copy application files | |
| COPY . /app | |
| # Environment variables for CPU optimization & HF Spaces port | |
| ENV PORT=7860 | |
| ENV CPU_THREADS=1 | |
| ENV ENABLE_MKLDNN=False | |
| ENV OMP_NUM_THREADS=1 | |
| ENV MKL_NUM_THREADS=1 | |
| ENV KMP_DUPLICATE_LIB_OK=TRUE | |
| ENV PYTHONUNBUFFERED=1 | |
| # Expose Hugging Face Space default port | |
| EXPOSE 7860 | |
| # Run Cham OCR Studio | |
| CMD ["python", "-u", "ocr-studio/app.py"] | |