netease-youdao / BCEmbedding

Netease Youdao's open-source embedding and reranker models for RAG products.
Apache License 2.0
1.35k stars 90 forks source link

cuda版本是多少? #3

Closed Jay931003 closed 6 months ago

Jay931003 commented 8 months ago

import的时候报错:

ImportError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import torch 2 import os 3 import re

File ~/.conda/envs/bce/lib/python3.10/site-packages/torch/init.py:235 233 if USE_GLOBAL_DEPS: 234 _load_global_deps() --> 235 from torch._C import * # noqa: F403 237 # Appease the type checker; ordinarily this binding is inserted by the 238 # torch._C module initialization code in C 239 if TYPE_CHECKING:

ImportError: /home/powerop/.conda/envs/bce/lib/python3.10/site-packages/torch/lib/libtorch_cuda.so: undefined symbol: ncclCommInitRankConfig

shenlei1020 commented 8 months ago

BCEmbedding只需要torch>=1.6.0就行。 您遇到的原因是您在安装BCEmbedding包的时候安装torch版本太新,依赖的cuda版本太高了,nvidia驱动不支持,建议这样操作: 1、创建conda环境之后,先手动安装torch,这时候选择你的cuda版本和驱动支持的torch版本(可以去pytorch官网找一键安装命令); 2、然后再安装BCEmbedding包就行了。