bilinguascript-htr / Dockerfile
unixio's picture
feat: kraken blla baseline segmentation as primary /segment engine (docTR fallback)
7a00c7e verified
Raw
History Blame Contribute Delete
710 Bytes
FROM python:3.10-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libglib2.0-0 libsm6 libxrender1 libxext6 \
libgl1 libgomp1 \
libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 \
libharfbuzz0b libharfbuzz-subset0 libgdk-pixbuf-2.0-0 libcairo2 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt \
# kraken pins torch~=2.1/numpy~=1.23 in metadata but runs fine on our
# torch 2.2.2/numpy 1.26; its real deps are pinned in requirements.txt.
&& pip install --no-cache-dir --no-deps kraken==5.2.9
COPY . .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]