RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
chore(docker): remove dead deepdoc_oss service from Go compose (#20316)
xugangqianga9c7304031fa
diff --git a/Dockerfile_deepdoc_oss b/Dockerfile_deepdoc_ossdeleted file mode 100644index e4a78ae77d..0000000000--- a/Dockerfile_deepdoc_oss+++ /dev/null@@ -1,66 +0,0 @@-# OSS DeepDoc server — minimal image with ONNX-only inference.-# Build: docker build -f Dockerfile_deepdoc_oss -t deepdoc_oss:latest .-# With mirror (China): docker build --build-arg NEED_MIRROR=1 -f Dockerfile_deepdoc_oss -t deepdoc_oss:latest .--FROM ubuntu:24.04--ARG NEED_MIRROR=1--ENV PYTHONPATH=/app-ENV DEBIAN_FRONTEND=noninteractive--# ── System dependencies (onnxruntime + opencv runtime libs) ──-RUN apt-get update && apt-get install -y --no-install-recommends \- -o Acquire::Retries=5 \- python3.12 python3.12-venv \- libglib2.0-0 libglx-mesa0 libgl1 libgomp1 \- libgdiplus curl ca-certificates \- && rm -rf /var/lib/apt/lists/*--# ── Python venv with ONNX inference stack ──-RUN python3.12 -m venv /app/.venv-COPY deepdoc/server/pyproject.toml /tmp/pyproject.toml-RUN PIP_INDEX="https://pypi.org/simple" && \- PIP_TRUSTED="" && \- if [ "$NEED_MIRROR" = "1" ]; then \- PIP_INDEX="https://mirrors.aliyun.com/pypi/simple"; \- PIP_TRUSTED="mirrors.aliyun.com"; \- fi && \- if [ -n "$PIP_TRUSTED" ]; then \- /app/.venv/bin/pip install --no-cache-dir -i "$PIP_INDEX" --trusted-host "$PIP_TRUSTED" \- litserve onnxruntime opencv-python-headless numpy pillow pyclipper \- python-multipart shapely six huggingface_hub; \- else \- /app/.venv/bin/pip install --no-cache-dir -i "$PIP_INDEX" \- litserve onnxruntime opencv-python-headless numpy pillow pyclipper \- python-multipart shapely six huggingface_hub; \- fi--# ── ONNX models (downloaded from HuggingFace) ──-COPY deepdoc/server/download_deps.py /tmp/download_deps.py-RUN if [ "$NEED_MIRROR" = "1" ]; then \- export HF_ENDPOINT=https://hf-mirror.com; \- fi && \- mkdir -p /app/rag/res/deepdoc && \- /app/.venv/bin/python3 /tmp/download_deps.py /app/rag/res/deepdoc--# ── Vision module (ONNX inference logic) ──-RUN mkdir -p /app/deepdoc/vision-COPY deepdoc/vision/ /app/deepdoc/vision/--# ── Docker stubs (lightweight replacements for heavy common/rag/deepdoc imports) ──-COPY deepdoc/server/docker_stubs.py /tmp/docker_stubs.py-RUN /app/.venv/bin/python3 /tmp/docker_stubs.py--# ── Server code ──-RUN mkdir -p /app/deepdoc/server/endpoints /app/deepdoc/server/adapters-COPY deepdoc/server/deepdoc_server.py /app/deepdoc/server/-COPY deepdoc/server/endpoints/ /app/deepdoc/server/endpoints/-COPY deepdoc/server/adapters/ /app/deepdoc/server/adapters/--EXPOSE 9390--HEALTHCHECK --interval=10s --timeout=10s --retries=5 \- CMD curl -f http://localhost:9390/health || exit 1--ENTRYPOINT ["/app/.venv/bin/python3", "/app/deepdoc/server/deepdoc_server.py", "--model-dir", "/app/rag/res/deepdoc"]\ No newline at end of filediff --git a/cmd/ragflow_server.go b/cmd/ragflow_server.goindex 49bb9dfda5..6fc51720d0 100644--- a/cmd/ragflow_server.go+++ b/cmd/ragflow_server.go@@ -1501,7 +1501,7 @@ func logTokenizerCounters() {}// resolveDeepDocModelDir picks the model directory: the explicit DEEPDOC_MODEL_DIR-// env, else the RAGFlow default (rag/res/deepdoc, mirroring deepdoc_server.py),+// env, else the RAGFlow default model dir (rag/res/deepdoc),// else the snapshot fetched by ragflow_deps/download_deps.py. The first// candidate that actually contains the required weights wins.func resolveDeepDocModelDir() string {diff --git a/docker/docker-compose.yml b/docker/docker-compose.ymlindex 7b2042c29b..7efcfee773 100644--- a/docker/docker-compose.yml+++ b/docker/docker-compose.yml@@ -3,22 +3,6 @@ include:# To ensure that the container processes the locally modified `service_conf.yaml.template` instead of the one included in its image, you need to mount the local `service_conf.yaml.template` to the container.services:- deepdoc:- image: ${DEEPDOC_IMAGE:-deepdoc_oss:latest}- profiles:- - deepdoc- build:- context: ..- dockerfile: Dockerfile_deepdoc_oss- networks:- - ragflow- restart: unless-stopped- healthcheck:- test: ["CMD", "curl", "-f", "http://localhost:9390/health"]- interval: 10s- timeout: 10s- retries: 60-ragflow-cpu:depends_on:mysql:diff --git a/internal/common/environments.go b/internal/common/environments.goindex dc225657a7..d161c36f4a 100644--- a/internal/common/environments.go+++ b/internal/common/environments.go@@ -249,13 +249,12 @@ const (// EnvDeepDocModelDir points the in-process (Go) DeepDoc backend at the// model snapshot (see common.DeepDocModelFiles); mirrors- // deepdoc_server.py's --model-dir (default rag/res/deepdoc).+ // the RAGFlow default model dir (rag/res/deepdoc).EnvDeepDocModelDir = "DEEPDOC_MODEL_DIR"// EnvDeepDocDropScore overrides the confidence threshold below which the// in-process (Go) DeepDoc backend blanks recognized text while preserving- // the real score. It MUST match the Python inference service's- // Recognizer.drop_score (deepdoc/vision/ocr.py, default 0.5) so both- // backends apply the same text-blanking contract.+ // the real score. It defaults to 0.5, matching the historical DeepDoc+ // recognizer drop_score, so recognized text is blanked consistently.EnvDeepDocDropScore = "DEEPDOC_DROP_SCORE"// EnvDeepDocInferenceConcurrency bounds how many DeepDoc ONNX inference// Runs may be in flight at once (each uses one core). It overrides the@@ -267,10 +266,9 @@ const (// DeepDocModelFiles is the single source of truth for the weights the// in-process (Go) DeepDoc backend requires to serve. The Go backend consumes// the FlatBuffer (.ort) serialization — the static ONNX Runtime build linked-// into the Go binary supports .ort only, not the protobuf .onnx format. The-// Python DeepDoc service keeps the legacy .onnx files and lists them-// independently (see deepdoc/server/download_deps.py), so this slice must NOT-// re-add the .onnx names; it is the Go presence check, not a shared list.+// into the Go binary supports .ort only, not the protobuf .onnx format, so+// this slice must NOT re-add the .onnx names; it is the Go presence check,+// not a shared list.// cmd/ resolves the model directory against it; the native analyzer validates// file presence against it via HasModelFiles. Order is insignificant (callers// do set-membership checks); keep it stable so logs and diffs stay readable.@@ -280,9 +278,7 @@ const (// (it fetches the files one by one, so it MUST be edited by hand when this// slice changes);// - ragflow_deps/download_deps.py snapshots the whole InfiniFlow/deepdoc repo-// (so .ort lands in the model dir automatically — no FILES edit needed);-// - deepdoc/server/download_deps.py (the Python-only Dockerfile_deepdoc_oss-// image) keeps the .onnx list and must NOT be changed to .ort.+// (so .ort lands in the model dir automatically — no FILES edit needed).var DeepDocModelFiles = []string{"det.ort","layout.ort",