本地社区版部署版本不兼容onnxruntime #84

Closed
opened 2026-02-16 11:19:42 -05:00 by yindo · 4 comments
Owner

Originally created by @syl51168 on GitHub (Mar 3, 2025).

你们使用的python本本是3.12.0 但是onnxruntime 官方只支持 Python 3.8 - 3.11,而你使用的是 Python 3.12,还怎么玩

Originally created by @syl51168 on GitHub (Mar 3, 2025). 你们使用的python本本是3.12.0 但是onnxruntime 官方只支持 Python 3.8 - 3.11,而你使用的是 Python 3.12,还怎么玩
yindo added the bug label 2026-02-16 11:19:42 -05:00
yindo closed this issue 2026-02-16 11:19:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 3, 2025):

@syl51168 你好!我是Dosu,一个可以帮助你解决 bug、回答问题并成为贡献者的机器人。在等待人类维护者的过程中,我可以帮助你解决问题。

Dify 文档中指定的本地社区版部署使用的是 Python 3.12 [1]。如果 onnxruntime 目前只支持 Python 3.8 到 3.11,您可能需要考虑使用虚拟环境来安装兼容的 Python 版本,或者等待 onnxruntime 更新以支持 Python 3.12。

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

@dosubot[bot] commented on GitHub (Mar 3, 2025): <!-- Greeting --> @syl51168 你好!我是[Dosu](https://dosu.dev),一个可以帮助你解决 bug、回答问题并成为贡献者的机器人。在等待人类维护者的过程中,我可以帮助你解决问题。 <!-- Answer --> Dify 文档中指定的本地社区版部署使用的是 Python 3.12 <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/local-source-code.md)</sup>。如果 onnxruntime 目前只支持 Python 3.8 到 3.11,您可能需要考虑使用虚拟环境来安装兼容的 Python 版本,或者等待 onnxruntime 更新以支持 Python 3.12。 <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/473d7e12-1ae2-4ffa-aa59-fbc277793218?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/473d7e12-1ae2-4ffa-aa59-fbc277793218?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/473d7e12-1ae2-4ffa-aa59-fbc277793218?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/473d7e12-1ae2-4ffa-aa59-fbc277793218?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/473d7e12-1ae2-4ffa-aa59-fbc277793218?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/473d7e12-1ae2-4ffa-aa59-fbc277793218?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/473d7e12-1ae2-4ffa-aa59-fbc277793218?feedback_type=other)</sup>
Author
Owner

@syl51168 commented on GitHub (Mar 3, 2025):

你们官方本地部署是如何部署的呢?
还是说给的教程就是错的

@syl51168 commented on GitHub (Mar 3, 2025): 你们官方本地部署是如何部署的呢? 还是说给的教程就是错的
Author
Owner

@dosubot[bot] commented on GitHub (Mar 3, 2025):

官方本地部署的步骤如下:

  1. 通过 PyPI 安装 Xinference:

    $ pip install "xinference[all]"
    
  2. 本地启动 Xinference:

    $ xinference-local
    

    这将在本地启动一个工作节点,端点为 http://127.0.0.1:9997。默认情况下,访问仅限于本地机器,但可以通过 -H 0.0.0.0 配置以允许任何非本地客户端访问。更多详细的配置选项可以使用 xinference-local --help 查看。

  3. 访问 http://127.0.0.1:9997,选择所需的模型和规格进行创建和部署。确保模型与您的硬件平台兼容,可以查看 Xinference 内置模型

  4. 从部署页面获取模型 UID,这是在 Dify 等应用中连接模型所必需的。

教程是正确的。此外,如果使用 Docker 部署 Dify,确保网络设置允许 Dify 容器访问 Xinference 端点,使用主机机器的 IP 地址而不是 localhost [1][2]

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

@dosubot[bot] commented on GitHub (Mar 3, 2025): <!-- Answer --> 官方本地部署的步骤如下: 1. 通过 PyPI 安装 Xinference: ```bash $ pip install "xinference[all]" ``` 2. 本地启动 Xinference: ```bash $ xinference-local ``` 这将在本地启动一个工作节点,端点为 `http://127.0.0.1:9997`。默认情况下,访问仅限于本地机器,但可以通过 `-H 0.0.0.0` 配置以允许任何非本地客户端访问。更多详细的配置选项可以使用 `xinference-local --help` 查看。 3. 访问 `http://127.0.0.1:9997`,选择所需的模型和规格进行创建和部署。确保模型与您的硬件平台兼容,可以查看 [Xinference 内置模型](https://inference.readthedocs.io/en/latest/models/builtin/index.html)。 4. 从部署页面获取模型 UID,这是在 Dify 等应用中连接模型所必需的。 教程是正确的。此外,如果使用 Docker 部署 Dify,确保网络设置允许 Dify 容器访问 Xinference 端点,使用主机机器的 IP 地址而不是 localhost <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/llms.txt)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/development/models-integration/xinference.md)</sup>。 <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/62eb550b-5509-41ee-8ac1-de9c34b30daf?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/62eb550b-5509-41ee-8ac1-de9c34b30daf?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/62eb550b-5509-41ee-8ac1-de9c34b30daf?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/62eb550b-5509-41ee-8ac1-de9c34b30daf?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/62eb550b-5509-41ee-8ac1-de9c34b30daf?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/62eb550b-5509-41ee-8ac1-de9c34b30daf?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/62eb550b-5509-41ee-8ac1-de9c34b30daf?feedback_type=other)</sup>
Author
Owner

@syl51168 commented on GitHub (Mar 3, 2025):

本地部署,只有中间件是docker的方式跑起来的,api还是直接本地目录部署的

@syl51168 commented on GitHub (Mar 3, 2025): 本地部署,只有中间件是docker的方式跑起来的,api还是直接本地目录部署的
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs-archived#84