polyscriptor-htr-demo / Dockerfile
Achim Rabus
Deploy: TrOCR + Kraken engines, dynamic model lists, comparison panel
61b711a
Raw
History Blame Contribute Delete
677 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
POLYSCRIPTOR_PROFILE=hf_space_demo \
HF_HOME=/tmp/huggingface \
PORT=7860
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Kraken requires numpy>=2.0; install after base deps so pip upgrades numpy cleanly
RUN pip install --no-cache-dir "kraken>=6.0.0"
COPY . /app
EXPOSE 7860
CMD ["python", "-m", "uvicorn", "web.polyscriptor_server:app", "--host", "0.0.0.0", "--port", "7860"]