mirror of
https://github.com/langgenius/dify-docs-archived.git
synced 2026-07-25 13:35:35 -04:00
docker启动后,系统模型下拉框设置里面都是空 #92
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xmbt-robert on GitHub (Mar 6, 2025).
我成功启动了所有docker镜像容器,然后开始设置接入大模型,但是设置里面的下拉框都是空值,导致我无法使用大模型接入
@dosubot[bot] commented on GitHub (Mar 6, 2025):
@xmbt-robert 你好!我是一个可以帮助你解决bug、回答问题并成为贡献者的机器人。我会在等待人类维护者期间为你提供帮助。
下拉框为空可能是因为Ollama服务无法从Docker容器中访问。这通常是因为服务绑定到了
localhost,这指的是容器本身,而不是主机或其他容器。要解决这个问题,需要将Ollama服务暴露到网络上,通过设置OLLAMA_HOST环境变量为0.0.0.0,并确保服务可以通过host.docker.internal而不是localhost访问。对于macOS:
然后重启Ollama应用。
对于Linux:
编辑systemd服务:
然后重新加载systemd并重启Ollama:
对于Windows:
编辑系统环境变量以设置
OLLAMA_HOST,然后重启Ollama。确保服务URL使用
http://host.docker.internal:11434而不是localhost[1]。To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other