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)
This commit is contained in:
Stephen Hu 2025-05-06 14:38:36 +08:00 committed by GitHub
parent 60787f8d5d
commit 65537b8200
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,6 +57,7 @@ class Base(ABC):
class DefaultEmbedding(Base):
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
_model = None
_model_name = ""
_model_lock = threading.Lock()