Download Dockerfile from chipling/paddleocr: direct link, hf CLI and curl.
- Browser
- Download file 868 Bytes
-
https://huggingface.co/spaces/chipling/paddleocr/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/chipling/paddleocr/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/chipling/paddleocr/resolve/main/Dockerfile
868 Bytes
| # Use a Python base with high compatibility | |
| FROM python:3.10-slim | |
| # Install system dependencies for OCR and Image processing | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install GLM-OCR and required inference engines | |
| RUN pip install --no-cache-dir \ | |
| torch --index-url https://download.pytorch.org/whl/cpu \ | |
| transformers \ | |
| accelerate \ | |
| einops \ | |
| pillow \ | |
| fastapi \ | |
| uvicorn \ | |
| python-multipart | |
| # Script to pre-load the model (0.9B is ~1.8GB on disk) | |
| RUN python3 -c "from transformers import AutoModelForCausalLM, AutoTokenizer; \ | |
| AutoModelForCausalLM.from_pretrained('THUDM/glm-4v-9b', trust_remote_code=True)" | |
| # Create a simple FastAPI app wrapper | |
| COPY app.py . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |