dify 升級1.7.1 插件無法下載依賴
1. 安裝通義千問插件,各種報錯;
使用下面命令查看docker 鏡像日志
docker logs -f --tail=100 docker-plugin_daemon-1
2025/08/01 07:42:21 full_duplex.go:59: [INFO]init environment for plugin langgenius/tongyi:0.0.35
2025/08/01 07:44:40 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: exit status 1, output: Resolved 52 packages in 1m 28s
Downloading aiohttp (1.6MiB)
Downloading numpy (13.4MiB)
Downloading dashscope (1.2MiB)× Failed to download `tqdm==4.67.1`├─? Failed to extract archive: tqdm-4.67.1-py3-none-any.whl├─? I/O operation failed during extraction╰─? Failed to download distribution due to network timeout. Try increasingUV_HTTP_TIMEOUT (current value: 30s).help: `tqdm` (v4.67.1) was included because `openai` (v1.70.0) depends on`tqdm`
, retrying
問題主要是plugin 插件服務無法下載python依賴,只要配置從國內鏡像源下載即可;
修改.env
, 放開pip 鏡像配置,問題修復
PLUGIN_PYTHON_ENV_INIT_TIMEOUT=120
PLUGIN_MAX_EXECUTION_TIMEOUT=600
PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
#PIP_MIRROR_URL=
2. 部署問題
1、添加權限
# cd /iflytek/server/dify/docker/volumes
# chmod -R 777 *2、推測是容器權限不夠,準備在docker-compose.yaml中添加特權運行配置內容。需要將docker_api_1 、docker_worker_1 docker_sandbox_1 都添加特權運行。api:image: langgenius/dify-api:1.4.1restart: alwaysprivileged: true
參考:
Dify 部署問題處理