Files
zeekay 0a5c8dfdd0 fix(docker): pin Debian bookworm + libgl1 (was libgl1-mesa-glx)
The bare python:3.10 / python:3.10-slim tags floated onto a Debian release
where libgl1-mesa-glx was removed, breaking apt-get (exit 100). Pin the
bookworm suite and use libgl1 (its replacement). No Python major bump.
2026-06-23 21:57:50 -07:00

28 lines
760 B
Docker

FROM python:3.10-slim-bookworm AS lite
WORKDIR /app
# Install pandoc and netcat. libgl1 (bookworm) replaces the old
# libgl1-mesa-glx and provides the OpenGL runtime opencv/unstructured need.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
pandoc \
netcat-openbsd \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.lite.txt .
RUN pip install --no-cache-dir -r requirements.lite.txt
# Download standard NLTK data, to prevent unstructured from downloading packages at runtime
RUN python -m nltk.downloader -d /app/nltk_data punkt_tab averaged_perceptron_tagger
ENV NLTK_DATA=/app/nltk_data
# Disable Unstructured analytics
ENV SCARF_NO_ANALYTICS=true
COPY . .
CMD ["python", "main.py"]