Closed Mydreamandreality closed 6 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
:
langchain
and langchain-experimental
, for indirect heavy dependencies. Look for lighter alternatives that fulfill your requirements.unstructured[all-docs]
, consider limiting optional dependencies to avoid unnecessary heavy installations.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.
torch还是要的,但是应该是cpu的
是里面的unstructured默认需要torch2.2.0,导致默认安装torch,而linux下直接安装torch默认会安装gpu版的,所以应该先pip3 install torch==2.2.0 --index-url https://download.pytorch.org/whl/cpu。
顺带一提,在线api里的qianfan里的cachetools的依赖没有加上。我真不知道这是怎么写出来的
还有strsimpy这个依赖在requirements_lite.txt里也没有加上
还有markdownify, sentence_transformers, streamlit, 这些都没有,要不咱把requirements_lite.txt删了吧亲 @zRzRzRzRzRzRzR
问题描述 / 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.