You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Install pandoc (DOCX /text extraction) and netcat (DB wait-for in entrypoint)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
pandoc \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.lite.txt .
# Install without writing .pyc (regenerated lazily at runtime) and drop bundled
# package test suites — trims ~265MB of dead weight from the image.
RUN pip install --no-cache-dir --no-compile -r requirements.lite.txt \
&& find /usr/local/lib/python3.12/site-packages \
-type d -name tests -prune -exec rm -rf {} + \
&& find /usr/local/lib/python3.12/site-packages \
-type d -name __pycache__ -prune -exec rm -rf {} +
# Download standard NLTK data, to prevent unstructured from downloading packages at runtime.
# Use the Python API with explicit package IDs (rather than `python -m nltk.downloader`),
# which never falls back to the interactive prompt that EOFs during a non-interactive
# build; unknown IDs are tolerated so the build stays version-agnostic across nltk releases.
RUN python -c "import nltk; [nltk.download(p, download_dir='/app/nltk_data') for p in ['punkt_tab', 'averaged_perceptron_tagger', 'averaged_perceptron_tagger_eng']]"