dify 1.0.1无法在ollama下新增LLM模型
dify LLM ollama deepseek
原来在0.15很正常,升到1.0.0之后就不行 了,再后来1.0.1出来后,以为问题都解决了,没想到还是有问题。
具体是:添加ollama是容易了,但是添加模型(比如deepseek)还是不行。表现为点“保存”后,按钮一直灰色无响应,浏览器并不锁死。看后台进程,在一段时间后(超时)出来红色的错误:
……
plugin_daemon-1 | 2025/03/17 15:13:15 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: Resolved 38 packages in 2m 15s
……
以为是dify有问题,或者以前残留的数据有原因,做了一切能做的,包括删除项目,清除存储文件,甚至docker存储的虚拟磁盘都删了,还是不行。
后来参阅一篇文章《【踩坑】pip安装依赖卡在Installing build dependencies ...》,地址:https://blog.csdn.net/m0_51371693/article/details/144268469
有所触动,升级了一下numpy和pip的版本:
PS C:\Users\Admin> pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: numpy in c:\users\Admin\appdata\local\programs\python\python310\lib\site-packages (1.24.2)
[notice] A new release of pip is available: 23.2.1 -> 25.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
PS C:\Users\Admin> python.exe -m pip install --upgrade pip
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pip in c:\users\Admin\appdata\local\programs\python\python310\lib\site-packages (23.2.1)
Collecting pip
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c9/bc/b7db44f5f39f9d0494071bddae6880eb645970366d0a200022a1a93d57f5/pip-25.0.1-py3-none-any.whl (1.8 MB)
---------------------------------------- 1.8/1.8 MB 4.0 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 23.2.1
Uninstalling pip-23.2.1:
Successfully uninstalled pip-23.2.1
Successfully installed pip-25.0.1
PS C:\Users\Admin> pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: numpy in c:\users\Admin\appdata\local\programs\python\python3
10\lib\site-packages (1.24.2)