From 65537b8200e5a335172669e995c347d032dc6ab4 Mon Sep 17 00:00:00 2001 From: Stephen Hu Date: Tue, 6 May 2025 14:38:36 +0800 Subject: [PATCH] Fix:Set CUDA_VISIBLE_DEVICES In DefaultEmbedding (#7465) ### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/7420 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/llm/embedding_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rag/llm/embedding_model.py b/rag/llm/embedding_model.py index 03cfcf0b0..5c978040b 100644 --- a/rag/llm/embedding_model.py +++ b/rag/llm/embedding_model.py @@ -57,6 +57,7 @@ class Base(ABC): class DefaultEmbedding(Base): + os.environ['CUDA_VISIBLE_DEVICES'] = '0' _model = None _model_name = "" _model_lock = threading.Lock()