精华 Dify社区版本1.0.0 无法配置tongyi API秘钥的解决方法
更多Dify+Deepseek AI大模型应用开发实战访问:https://www.itying.com/goods-1206.html
1、停止Dify
docker compose stop
2、【修改】找到docker目录下面的 .env 把默认的GUNICORN_TIMEOUT的值为1000
GUNICORN_TIMEOUT=1000
3、修改docker目录下面的docker-compose.yaml
新增
PYTHON_ENV_INIT_TIMEOUT: ${PYTHON_ENV_INIT_TIMEOUT:-640}
PIP_MIRROR_URL: https://pypi.tuna.tsinghua.edu.cn/simple
位置参考下图
4、重启dify
docker compose up -d
参考:https://github.com/langgenius/dify/issues/14654
5、docker-compose logs api 可以看日志
D:\dify\dify_git\dify\docker>docker-compose logs api
api-1 | Running migrations
api-1 | 2025-03-07 11:22:54.623 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 8 threads.
api-1 | /app/api/.venv/lib/python3.12/site-packages/opik/evaluation/metrics/heuristics/regex_match.py:8: SyntaxWarning: invalid escape sequence '\d'
api-1 | """
api-1 | 2025-03-07 11:23:33.780 INFO [MainThread] [_client.py:1038] - HTTP Request: GET https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json "HTTP/1.1 200 OK"
api-1 | Preparing database migration...
api-1 | Database migration skipped
api-1 | [2025-03-07 11:24:04 +0000] [1] [INFO] Starting gunicorn 23.0.0
api-1 | [2025-03-07 11:24:04 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
api-1 | [2025-03-07 11:24:04 +0000] [1] [INFO] Using worker: gevent
api-1 | [2025-03-07 11:24:04 +0000] [29] [INFO] Booting worker with pid: 29
api-1 | 2025-03-07 11:24:24.767 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 8 threads.
更多Dify+Deepseek AI大模型应用开发实战访问:https://www.itying.com/goods-1206.html
1 回复