Download Dockerfile from moterial/ocr: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/spaces/moterial/ocr/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/moterial/ocr/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/moterial/ocr/resolve/main/Dockerfile
604 Bytes
| FROM python:3.10-slim | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Unbuffered stdout so print() lines show up in HF container logs immediately | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| COPY --chown=user ./ocr_server.py /app/ocr_server.py | |
| COPY --chown=user ./captcha_model.onnx /app/captcha_model.onnx | |
| EXPOSE 7860 | |
| CMD ["gunicorn", "ocr_server:app", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "60", "--access-logfile", "-"] | |