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
refine dockerfile (#1801)
Kevin Hu29509ff69db8
diff --git a/Dockerfile b/Dockerfileindex 2da41e2873..780caaeaf9 100644--- a/Dockerfile+++ b/Dockerfile@@ -10,7 +10,7 @@ ADD ./api ./apiADD ./conf ./confADD ./deepdoc ./deepdocADD ./rag ./rag-ADD ./graph ./graph+ADD ./agent ./agentENV PYTHONPATH=/ragflow/ENV HF_ENDPOINT=https://hf-mirror.comdiff --git a/Dockerfile.arm b/Dockerfile.armindex b64401e187..9dfc80e7e8 100644--- a/Dockerfile.arm+++ b/Dockerfile.arm@@ -21,7 +21,7 @@ ADD ./api ./apiADD ./conf ./confADD ./deepdoc ./deepdocADD ./rag ./rag-ADD ./graph ./graph+ADD ./agent ./agentENV PYTHONPATH=/ragflow/ENV HF_ENDPOINT=https://hf-mirror.comdiff --git a/Dockerfile.cuda b/Dockerfile.cudaindex 81a444d7c6..c8905e2801 100644--- a/Dockerfile.cuda+++ b/Dockerfile.cuda@@ -15,7 +15,7 @@ ADD ./api ./apiADD ./conf ./confADD ./deepdoc ./deepdocADD ./rag ./rag-ADD ./graph ./graph+ADD ./agent ./agentENV PYTHONPATH=/ragflow/ENV HF_ENDPOINT=https://hf-mirror.comdiff --git a/Dockerfile.scratch b/Dockerfile.scratchindex a607b63bc1..26b707f30e 100644--- a/Dockerfile.scratch+++ b/Dockerfile.scratch@@ -30,7 +30,7 @@ ADD ./conf ./confADD ./deepdoc ./deepdocADD ./rag ./ragADD ./requirements.txt ./requirements.txt-ADD ./graph ./graph+ADD ./agent ./agentRUN apt install openmpi-bin openmpi-common libopenmpi-devENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu/openmpi/lib:$LD_LIBRARY_PATHdiff --git a/Dockerfile.scratch.oc9 b/Dockerfile.scratch.oc9index 9053343866..548a8ebc84 100644--- a/Dockerfile.scratch.oc9+++ b/Dockerfile.scratch.oc9@@ -30,7 +30,7 @@ ADD ./conf ./confADD ./deepdoc ./deepdocADD ./rag ./ragADD ./requirements.txt ./requirements.txt-ADD ./graph ./graph+ADD ./agent ./agentRUN dnf install -y openmpi openmpi-devel python3-openmpiENV C_INCLUDE_PATH /usr/include/openmpi-x86_64:$C_INCLUDE_PATHdiff --git a/graphrag/leiden.py b/graphrag/leiden.pyindex 945ef585e1..4fa1720ab4 100644--- a/graphrag/leiden.py+++ b/graphrag/leiden.py@@ -25,6 +25,7 @@ from graspologic.partition import hierarchical_leidenfrom graspologic.utils import largest_connected_componentimport networkx as nx+from networkx import is_emptylog = logging.getLogger(__name__)@@ -91,13 +92,14 @@ def _compute_leiden_communities(seed=0xDEADBEEF,) -> dict[int, dict[str, int]]:"""Return Leiden root communities."""+ results: dict[int, dict[str, int]] = {}+ if is_empty(graph): return resultsif use_lcc:graph = stable_largest_connected_component(graph)community_mapping = hierarchical_leiden(graph, max_cluster_size=max_cluster_size, random_seed=seed)- results: dict[int, dict[str, int]] = {}for partition in community_mapping:results[partition.level] = results.get(partition.level, {})results[partition.level][partition.node] = partition.cluster