mirror of
https://github.com/hanzoai/chat-rag-api.git
synced 2026-10-30 18:45:41 +00:00
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.
28 lines
760 B
Docker
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"]
|