dify icon indicating copy to clipboard operation
dify copied to clipboard

[ERROR]init environment failed: failed to install dependencies: signal: killed, output: init process exited due to no activity for 120 seconds, retry in 30s

Open poechia opened this issue 1 year ago • 1 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

Dify1.0 plugin daemon

Cloud or Self Hosted

Cloud

Steps to reproduce

Image Image

✔️ Expected Behavior

Link to XInference Custom Models

❌ Actual Behavior

The Xinference plugin cannot be installed, so custom models cannot be linked

poechia avatar Mar 08 '25 17:03 poechia

Hey @poechia! I'm here to help you out with any bugs, questions, or contributions you might have. Let's squash those bugs together!

To resolve the error "init environment failed: failed to install dependencies: signal: killed, output: init process exited due to no activity for 120 seconds" when installing the Xinference plugin in a Docker container, you can try the following solutions:

  1. Extend the Timeout Period: Increase the timeout period for the Python environment initialization by adding the PYTHON_ENV_INIT_TIMEOUT environment variable to your docker-compose.yaml file under the plugin_daemon service configuration. Set it to a higher value, such as 320 seconds:

    plugin_daemon:
      environment:
        PYTHON_ENV_INIT_TIMEOUT: 320
    
  2. Optimize File System Usage on Windows: If you are using Docker on Windows, consider moving the dify/docker directory to the WSL filesystem instead of using Windows NTFS to improve performance.

  3. Set Plugin Working Path: Add the following environment variable to your .env file to specify the plugin working path:

    PLUGIN_WORKING_PATH=/app/cwd
    

Additionally, if you're using an internal network, consider setting the PIP_MIRROR_URL environment variable in plugin_daemon to use a mirror URL (e.g., https://pypi.tuna.tsinghua.edu.cn/simple) to potentially improve installation speed [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

dosubot[bot] avatar Mar 08 '25 17:03 dosubot[bot]

Duplicated See this https://github.com/langgenius/dify-plugin-daemon/pull/59

crazywoola avatar Mar 09 '25 02:03 crazywoola

https://www.bilibili.com/video/BV1f6R8YbEqG/?spm_id_from=333.788.comment.all.click&vd_source=03d1b4784c326e357d854f6668666d67 看这个

KzNight avatar Mar 10 '25 12:03 KzNight