unstructured 仅安装CPU

monwx1rj  于 2个月前  发布在  其他
关注(0)|答案(5)|浏览(39)

我已经在一台100% CPU的机器上使用非结构化数据处理一段时间了。我注意到我的虚拟环境文件夹中有很多来自PyTorch(可能是unstructured的一个依赖项)的NVIDIA文件(+2GB)。
我可以安装一个仅支持CPU的unstructured版本吗?因为我已经分区了一段时间,没有使用GPU。
这是我的requirements.in文件:

uvicorn[standard]==0.25.0
fastapi==0.111.0
pyyaml==6.0.1
injector==0.21.0
overrides==7.7.0
langchain==0.2.5
langchain-google-genai==1.0.6
json-repair==0.9.0
unstructured[pptx,image,docx,pdf]==0.14.9
opencv-python-headless==4.9.0.80
jq==1.6.0
pytesseract==0.3.10
pymilvus==2.3.6
langchain-openai==0.1.8
scikit-learn==1.5.0
ruff==0.3.1
pandas==2.2.1
llama-index==0.10.33
python-multipart==0.0.9
llama-index-vector-stores-milvus==0.1.10
playwright==1.43.0
python-magic==0.4.27
llama-index-llms-gemini==0.1.11
opencv-python==4.9.0.80
llama-index-llms-anthropic==0.1.11
llama-index-llms-ollama==0.1.5
llama-index-embeddings-ollama==0.1.2
pymupdf==1.24.4
pypdf[image]==4.2.0
llama-index-multi-modal-llms-ollama==0.1.3
llama-index-llms-groq==0.1.4
gensim==3.6.0
firebase-admin==6.5.0
demjson3==3.0.6
langchain-community==0.2.5
jsonschema==4.22.0
pypdf2==3.0.1
fpdf==1.7.2
moviepy==1.0.3
neo4j==5.21.0
llama-index-graph-stores-neo4j==0.2.5
pylatex==1.4.2
reportlab==4.2.0
psutil==5.9.8
fastapi-utils==0.7.0
colorama==0.4.6
humanize==4.9.0
objgraph==3.6.1
imgkit==1.2.3
pyppeteer==2.0.0
wkhtmltopdf==0.2
llama-agents==0.0.3
click==8.1.7
mypy==1.10.1

请注意,上面没有提到torch。

gkn4icbw

gkn4icbw1#

感谢建议@arthurbrenno。我们会考虑这个建议。我认为这将有助于减小我们的CPU映像的大小。

pzfprimi

pzfprimi2#

Tysm!这将为我们节省大约3GB的存储空间。

whhtz7ly

whhtz7ly3#

@arthurbrenno see here #2976

hgtggwj0

hgtggwj04#

在安装非结构化库之前,先安装torch-cpu可能会有所帮助。这将不会安装PyTorch的NVIDIA GPU库。
这是我一直在做的事情来构建Lambda镜像。

wdebmtf2

wdebmtf25#

谢谢你,@sidatcd!

相关问题