chatchat-space / Langchain-Chatchat

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain
Apache License 2.0
31.96k stars 5.56k forks source link

[BUG] 最轻量部署依然安装torch、nvidia-XXX系列的依赖 #3748

Closed Mydreamandreality closed 6 months ago

Mydreamandreality commented 7 months ago

问题描述 / Problem Description 最轻量用的都是线上的api,确依然安装了torch等依赖

复现问题的步骤 / Steps to Reproduce pip install -r requirements_lite.txt

预期的结果 / Expected Result 安装web相关的依赖

实际结果 / Actual Result 安装torch,naidia-XXX一大堆系列的依赖

环境信息 / Environment Information

附加信息 / Additional Information 添加与问题相关的任何其他信息 / Add any other information related to the issue.

dosubot[bot] commented 7 months ago

It appears the issue with heavy dependencies like torch and NVIDIA-related ones being installed, despite aiming for a lightweight deployment, is due to indirect dependencies within the packages listed in your requirements_lite.txt. To address this, you'll need to scrutinize these packages for any heavy dependencies they might be pulling in.

Here's a strategy to refine your requirements_lite.txt:

For example, ensure packages like faiss-cpu and accelerate do not indirectly include heavy dependencies. If they do, seek out lighter alternatives.

This approach should help you achieve a more lightweight deployment by avoiding unnecessary heavy dependencies.

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
zRzRzRzRzRzRzR commented 6 months ago

torch还是要的,但是应该是cpu的

EscaticZheng commented 5 months ago

是里面的unstructured默认需要torch2.2.0,导致默认安装torch,而linux下直接安装torch默认会安装gpu版的,所以应该先pip3 install torch==2.2.0 --index-url https://download.pytorch.org/whl/cpu

EscaticZheng commented 5 months ago

顺带一提,在线api里的qianfan里的cachetools的依赖没有加上。我真不知道这是怎么写出来的

EscaticZheng commented 5 months ago

还有strsimpy这个依赖在requirements_lite.txt里也没有加上

EscaticZheng commented 5 months ago

还有markdownify, sentence_transformers, streamlit, 这些都没有,要不咱把requirements_lite.txt删了吧亲 @zRzRzRzRzRzRzR