gpt4 book ai didi

azure - 为什么在requirements.txt中添加chromadb会导致Azure部署失败

转载 作者:行者123 更新时间:2023-12-03 06:10:35 26 4
gpt4 key购买 nike

我正在 Azure Web 应用程序服务上部署智能 langchain python 聊天机器人。我一开始忘记在我的requirements.txt文件中添加chromadb,然后我就成功构建和部署了。但是当我在 txt 文件中添加 chromadb 时,构建很棒,但部署失败并显示此错误

Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/ffa6200f-ed27-47d4-b8a3-e502d83f86d6.zip (0.93 MB) to /tmp/zipdeploy/extracted
Error: Failed to deploy web package to App Service.
Error: Deployment Failed, Package deployment using ZIP Deploy failed. Refer logs for more details.

这不是断开应用服务的情况,因为它不起作用。仅当我删除 chromadb 时,部署才会成功,但是我的应用程序当然无法工作,因为它需要 chromadb 才能工作。

我该如何处理这个问题?我是编程和部署的完全初学者,任何形式的帮助将不胜感激

最佳答案

这是 chromadb 的已知限制,请参阅此 Github issueSO thread answers 。我在我的 requirements.txt

中添加了 chromadb
Django

whitenoise

chromadb

为了使 chromadb 正常工作,我使用 Python 版本 3.8 创建了 Azure Web 应用程序,并且在 requests.txt 中使用 chromadb 成功部署了 Web 应用程序,请参阅以下内容:-

enter image description here

通过 VS Code 应用服务扩展并使用“部署到 Web 应用”按钮部署 Web 应用。 chromadb 已成功安装在 Python 3.8 版本的 Web 应用程序中。

enter image description here

部署成功:-

enter image description here

网络应用程序 reference

enter image description here

通过 SSH 连接到我的 Web 应用程序并尝试访问 chromadb 可用的requirements.txt 文件,请参阅以下内容:-

ls
vi requirements.txt

enter image description here

enter image description here

关于azure - 为什么在requirements.txt中添加chromadb会导致Azure部署失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76845832/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com