Spaces:
Sleeping
Sleeping
Download backend/src/python/Dockerfile from simhaa-hat/generated-bill: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/spaces/simhaa-hat/generated-bill/resolve/main/backend/src/python/Dockerfile
- Command line
-
hf download hf://spaces/simhaa-hat/generated-bill/backend/src/python/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/simhaa-hat/generated-bill/resolve/main/backend/src/python/Dockerfile
871 Bytes
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1-mesa-glx \ | |
| libgomp1 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements | |
| COPY requirements.txt . | |
| # Install python dependencies | |
| # Using a mirror or specific install command for paddle might be safer, | |
| # but pip install -r usually works for cpu versions. | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Download the model files by running a dummy OCR once or explicitly downloading | |
| # PaddleOCR downloads models to ~/.paddleocr by default | |
| # We can pre-trigger this. | |
| RUN python -c "from paddleocr import PaddleOCR; PaddleOCR(use_angle_cls=True, lang='en', use_gpu=False)" | |
| # Copy source code | |
| COPY ocr_server.py . | |
| # Expose port | |
| EXPOSE 5001 | |
| # Command to run | |
| CMD ["python", "ocr_server.py"] | |