Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got error when install plugin in the offline env #15885

Open
5 tasks done
dickens88 opened this issue Mar 14, 2025 · 2 comments
Open
5 tasks done

Got error when install plugin in the offline env #15885

dickens88 opened this issue Mar 14, 2025 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@dickens88
Copy link

Self Checks

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

Dify version

v1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Hi,

I installed Dify v1.0.1 in a offline env which means it can not connect to internet directly. I download ollama plugin from marketplace and install the plugin from my pc. During the installation it get the following error.

plugin_daemon_1          | 2025/03/14 19:30:44 runtime_lifetime.go:76: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: init process exited due to no activity for 120 seconds, retry in 30s

I thought It was becuase there is no dependencies in the docker env. So is that means the latest version can not be used in the offline system?

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 🐞 bug Something isn't working label Mar 14, 2025
Copy link

dosubot bot commented Mar 14, 2025

I found some relevant discussions and issues regarding plugin installation in offline environments for Dify:

  1. dify1.0.0 cannot be used offline? - This discussion is open and addresses similar concerns about using Dify offline [1].

  2. Help with completely offline usage - Another open discussion that might provide insights into handling offline installations [2].

  3. After deploying v1.0-beta via Docker, plugins cannot be installed. - This discussion is also open and discusses issues with plugin installations in offline environments [3].

For your specific issue, the error you're encountering is likely due to missing dependencies in the Docker environment, which is a known limitation when using Dify offline. To resolve this, you can follow these steps:

  1. Simulate Installation with Network Access: On a machine with internet access, simulate the plugin installation to gather all necessary dependencies.

  2. Package the Plugin: Ensure your plugin is packaged into a .difypkg file. This allows for manual upload and installation in offline environments.

  3. Create a Docker Image: Use a multi-stage Docker build process to create an image that includes the installed plugin and all its dependencies.

  4. Transfer the Docker Image: Export and transfer this Docker image to your offline environment.

  5. Load the Image: Load the image in the offline environment.

  6. Configure Docker-Compose: Use this image in your docker-compose configuration to ensure all dependencies are available [4].

This approach should help you install the plugin without requiring internet access.

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

@dickens88
Copy link
Author

dickens88 commented Mar 14, 2025

well... I think I got a solution. I added my internal PIP source into docker-compose.yaml. The key setting is PIP_MIRROR_URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant