pageparse.ai / Dockerfile
Varun2007's picture
initial clean deployment commit with compilers
8c3e275
Raw
History Blame Contribute Delete
1.07 kB
FROM python:3.12-slim-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
gcc \
g++ \
tesseract-ocr \
tesseract-ocr-eng \
ffmpeg \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
COPY pyproject.toml README.md ./
COPY src/ ./src/
COPY grammars/ ./grammars/
COPY web/ ./web/
COPY scripts/ ./scripts/
RUN mkdir -p models && \
pip install --no-cache-dir -e . && \
pip install --no-cache-dir -e .[web]
EXPOSE 7860
VOLUME ["/app/models", "/app/web/static/uploads", "/app/pageparse.db"]
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/telemetry')" || exit 1
ENTRYPOINT ["python", "-m", "pageparse.cli", "serve", "--host", "0.0.0.0", "--port", "7860"]