mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 00:16:20 +00:00
docling separation
This commit is contained in:
1 parent
e101c0a7f1
commit
d7a7d4d084
12 files changed
+100
-13
No files matched your search
+11
-2
@@ -28,8 +28,8 @@ RUN wget -q -O - https://sh.rustup.rs | sh -s -- -y
|
||||
# Clean up to reduce container size
|
||||
RUN apt-get remove --purge -y wget unzip && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements.txt
|
||||
COPY requirements.txt .
|
||||
# Copy requirements manifests
|
||||
COPY requirements.txt requirements-docling.txt ./
|
||||
|
||||
# Setup Python virtual environment
|
||||
RUN python3.12 -m venv /venv
|
||||
@@ -42,6 +42,15 @@ RUN pip install --no-cache-dir --upgrade pip && \
|
||||
pip install --no-cache-dir tiktoken && \
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Optional docling parser engine (DOC_PARSER_ENGINE=docling, OCR for scanned
|
||||
# PDFs/images, read_document's structured output) — OFF by default: it pulls
|
||||
# the layout/OCR model stack and adds gigabytes to the image. anydoc (in
|
||||
# requirements.txt) is the default parser and needs none of it.
|
||||
ARG INSTALL_DOCLING=false
|
||||
RUN if [ "$INSTALL_DOCLING" = "true" ]; then \
|
||||
pip install --no-cache-dir -r requirements-docling.txt; \
|
||||
fi
|
||||
|
||||
# Final Stage
|
||||
FROM ubuntu:24.04 as final
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Optional docling parser engine.
|
||||
#
|
||||
# Needed only for: DOC_PARSER_ENGINE=docling, OCR of scanned PDFs and images
|
||||
# (DOCLING_OCR_ENABLED / DOCLING_OCR_ATTACHMENTS_ENABLED), .adoc/.vtt/.xml
|
||||
# source parsing, and the read_document tool's `structured` output. The
|
||||
# default anydoc engine needs none of this.
|
||||
#
|
||||
# Install ON TOP of requirements.txt (torch/transformers stay pinned there,
|
||||
# shared with sentence-transformers):
|
||||
# pip install -r requirements.txt -r requirements-docling.txt
|
||||
# Docker: build with --build-arg INSTALL_DOCLING=true
|
||||
docling==2.119.0
|
||||
rapidocr==3.9.2
|
||||
onnxruntime==1.28.0
|
||||
@@ -12,12 +12,10 @@ cryptography==50.0.0
|
||||
dataclasses-json==0.6.7
|
||||
daytona==0.205.1
|
||||
defusedxml==0.7.1
|
||||
docling==2.119.0
|
||||
# Default document converter (DOC_PARSER_ENGINE=anydoc); docling above is
|
||||
# the optional heavy engine for OCR/structured output.
|
||||
# Default document converter (DOC_PARSER_ENGINE=anydoc). The docling engine
|
||||
# (OCR, layout/table models, read_document's structured output) is an
|
||||
# optional extra: pip install -r requirements-docling.txt
|
||||
firecrawl-anydoc==0.2.3
|
||||
rapidocr==3.9.2
|
||||
onnxruntime==1.28.0
|
||||
docx2txt==0.9
|
||||
ddgs>=8.0.0
|
||||
fast-ebook
|
||||
@@ -98,10 +96,14 @@ sqlalchemy>=2.0,<3
|
||||
starlette>=1.0,<2
|
||||
tiktoken==0.13.0
|
||||
tokenizers==0.22.2
|
||||
# torch stays in core: sentence-transformers (local embeddings) needs it even
|
||||
# with the docling extra uninstalled.
|
||||
torch==2.11.0
|
||||
tqdm==4.67.3
|
||||
# Capped <5.9.0 to match docling-core's own darwin pin: 5.9+ breaks docling's
|
||||
# PDF layout model on Apple Silicon ("Cannot convert a MPS Tensor to float64").
|
||||
# Kept in core for sentence-transformers, so installing the optional docling
|
||||
# extra never changes the shared model stack. Capped <5.9.0 to match
|
||||
# docling-core's own darwin pin: 5.9+ breaks docling's PDF layout model on
|
||||
# Apple Silicon ("Cannot convert a MPS Tensor to float64").
|
||||
transformers==5.8.1
|
||||
typing-extensions==4.16.0
|
||||
typing-inspect==0.9.0
|
||||
|
||||
Reference in new issue
Block a user