plugin-daemon panic when set ollama model #133

Open
opened 2026-02-16 00:20:02 -05:00 by yindo · 2 comments
Owner

Originally created by @alwqx on GitHub (Jun 7, 2025).

Self Checks

To make sure we get to you in time, please check the following :)

  • 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."

Versions

  1. dify-plugin-daemon Version
  2. dify-api Version

Describe the bug
A clear and concise description of what the bug is.

when set ollama LLM model, plugin_damon panic. log below:

[GIN] 2025/06/07 - 13:17:44 | 200 |     417.208µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100"
[GIN] 2025/06/07 - 13:17:49 | 200 |     374.299µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100"
[GIN] 2025/06/07 - 13:17:54 | 200 |     386.488µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100"
[GIN] 2025/06/07 - 13:17:59 | 200 |     436.088µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100"
[GIN] 2025/06/07 - 13:18:01 | 200 |     454.218µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256"

[GIN] 2025/06/07 - 13:18:01 | 500 |    1.807572ms |      172.24.0.9 | POST     "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/dispatch/model/validate_model_credentials"

2025/06/07 13:18:01 [Recovery] 2025/06/07 - 13:18:01 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:262 (0x4768b8)
/usr/local/go/src/runtime/signal_unix.go:917 (0x476888)
/app/internal/core/plugin_manager/local_runtime/stdio.go:85 (0xdb8512)
/app/internal/core/plugin_manager/local_runtime/io.go:16 (0xdb5e7a)
/app/internal/core/plugin_daemon/generic.go:27 (0xfc2796)
/app/internal/core/plugin_daemon/model.gen.go:148 (0xfecc0b)
/app/internal/service/model.gen.go:193 (0xfecbf2)
/app/internal/service/base_sse.go:116 (0xff79da)
/app/internal/service/base_sse.go:44 (0xff7c3e)
/app/internal/service/base_sse.go:114 (0xff7924)
/app/internal/service/model.gen.go:191 (0xfecbb1)
/app/internal/server/controllers/model.gen.go:150 (0x1cfbab0)
/app/internal/server/controllers/base.go:53 (0x101f5b4)
/app/internal/server/controllers/base.go:31 (0x101fa34)
/app/internal/server/controllers/base.go:37 (0x101f4b5)
/app/internal/server/controllers/model.gen.go:147 (0x1cfb9f3)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:170 (0x1cfe2d3)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:97 (0x1cfe373)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:66 (0x1d02171)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:24 (0x1cfdb14)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf8386e)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0xf8385b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf829a4)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0xf8298b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf81d91)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0xf81800)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0xf81331)
/usr/local/go/src/net/http/server.go:3210 (0x7e062d)
/usr/local/go/src/net/http/server.go:2092 (0x7bfb4f)
/usr/local/go/src/runtime/asm_amd64.s:1700 (0x47caa0)

[GIN] 2025/06/07 - 13:18:01 | 200 |     314.758µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256"
[GIN] 2025/06/07 - 13:18:01 | 200 |     261.569µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256"
[GIN] 2025/06/07 - 13:18:01 | 200 |     215.219µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256"
[GIN] 2025/06/07 - 13:18:01 | 200 |     390.819µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256"


[GIN] 2025/06/07 - 13:18:01 | 500 |    1.451523ms |      172.24.0.9 | POST     "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/dispatch/model/schema"
2025/06/07 13:18:01 [Recovery] 2025/06/07 - 13:18:01 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:262 (0x4768b8)
/usr/local/go/src/runtime/signal_unix.go:917 (0x476888)
/app/internal/core/plugin_manager/local_runtime/stdio.go:85 (0xdb8512)
/app/internal/core/plugin_manager/local_runtime/io.go:16 (0xdb5e7a)
/app/internal/core/plugin_daemon/generic.go:27 (0xfc0a36)
/app/internal/core/plugin_daemon/model.gen.go:161 (0xfecceb)
/app/internal/service/model.gen.go:210 (0xfeccd2)
/app/internal/service/base_sse.go:116 (0xff6a9a)
/app/internal/service/base_sse.go:44 (0xff6cfe)
/app/internal/service/base_sse.go:114 (0xff69e4)
/app/internal/service/model.gen.go:208 (0xfecc91)
/app/internal/server/controllers/model.gen.go:163 (0x1cfb950)
/app/internal/server/controllers/base.go:53 (0x101f5b4)
/app/internal/server/controllers/base.go:31 (0x101fa34)
/app/internal/server/controllers/base.go:37 (0x101f4b5)
/app/internal/server/controllers/model.gen.go:160 (0x1cfb893)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:170 (0x1cfe2d3)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:97 (0x1cfe373)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:66 (0x1d02171)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a)
/app/internal/server/middleware.go:24 (0x1cfdb14)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf8386e)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0xf8385b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf829a4)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0xf8298b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf81d91)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0xf81800)
/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0xf81331)
/usr/local/go/src/net/http/server.go:3210 (0x7e062d)
/usr/local/go/src/net/http/server.go:2092 (0x7bfb4f)
/usr/local/go/src/runtime/asm_amd64.s:1700 (0x47caa0)

[GIN] 2025/06/07 - 13:18:01 | 200 |        34.5µs |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/asset/bfff83a66922c09cb5a5aa68829742b8b4f4e818579db42f53c7b8a30912cd8b.svg"
[GIN] 2025/06/07 - 13:18:04 | 200 |    1.499923ms |      172.24.0.9 | GET      "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100"

and the post url is http://aibox:2080/console/api/workspaces/current/model-providers/langgenius/ollama/ollama/models body json from chrome-dev-tool is

{"model":"deepseek-r1:8b","model_type":"llm","credentials":{"mode":"chat","context_size":"4096","max_tokens":"4096","vision_support":"false","function_call_support":"false","base_url":"http://172.17.0.1:11434"},"load_balancing":{"enabled":false,"configs":[]}}

To Reproduce
Steps to reproduce the behavior:

  1. deploy dify-v1.4.1 from release 1.4.1
git clone https://github.com/langgenius/dify.git
cd dify
git checkout 1.4.1
cd docker
cp .env.example .env
docker compose up -d
  1. goto dify page and finish account setup
  2. go to model providers and install ollama
  3. add model in ollama
  4. click "保存/Save" and docker logs -f docker-plugin_daemon-1 you will get panic log

Expected behavior
add ollama model

Screenshots

Image Image

Additional context
Add any other context about the problem here.

Originally created by @alwqx on GitHub (Jun 7, 2025). **Self Checks** To make sure we get to you in time, please check the following :) - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] "Please do not modify this template :) and fill in all the required fields." **Versions** 1. dify-plugin-daemon Version 2. dify-api Version **Describe the bug** A clear and concise description of what the bug is. when set ollama LLM model, `plugin_damon` panic. log below: ```shell [GIN] 2025/06/07 - 13:17:44 | 200 | 417.208µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100" [GIN] 2025/06/07 - 13:17:49 | 200 | 374.299µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100" [GIN] 2025/06/07 - 13:17:54 | 200 | 386.488µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100" [GIN] 2025/06/07 - 13:17:59 | 200 | 436.088µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100" [GIN] 2025/06/07 - 13:18:01 | 200 | 454.218µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256" [GIN] 2025/06/07 - 13:18:01 | 500 | 1.807572ms | 172.24.0.9 | POST "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/dispatch/model/validate_model_credentials" 2025/06/07 13:18:01 [Recovery] 2025/06/07 - 13:18:01 panic recovered: runtime error: invalid memory address or nil pointer dereference /usr/local/go/src/runtime/panic.go:262 (0x4768b8) /usr/local/go/src/runtime/signal_unix.go:917 (0x476888) /app/internal/core/plugin_manager/local_runtime/stdio.go:85 (0xdb8512) /app/internal/core/plugin_manager/local_runtime/io.go:16 (0xdb5e7a) /app/internal/core/plugin_daemon/generic.go:27 (0xfc2796) /app/internal/core/plugin_daemon/model.gen.go:148 (0xfecc0b) /app/internal/service/model.gen.go:193 (0xfecbf2) /app/internal/service/base_sse.go:116 (0xff79da) /app/internal/service/base_sse.go:44 (0xff7c3e) /app/internal/service/base_sse.go:114 (0xff7924) /app/internal/service/model.gen.go:191 (0xfecbb1) /app/internal/server/controllers/model.gen.go:150 (0x1cfbab0) /app/internal/server/controllers/base.go:53 (0x101f5b4) /app/internal/server/controllers/base.go:31 (0x101fa34) /app/internal/server/controllers/base.go:37 (0x101f4b5) /app/internal/server/controllers/model.gen.go:147 (0x1cfb9f3) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:170 (0x1cfe2d3) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:97 (0x1cfe373) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:66 (0x1d02171) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:24 (0x1cfdb14) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf8386e) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0xf8385b) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf829a4) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0xf8298b) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf81d91) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0xf81800) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0xf81331) /usr/local/go/src/net/http/server.go:3210 (0x7e062d) /usr/local/go/src/net/http/server.go:2092 (0x7bfb4f) /usr/local/go/src/runtime/asm_amd64.s:1700 (0x47caa0) [GIN] 2025/06/07 - 13:18:01 | 200 | 314.758µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256" [GIN] 2025/06/07 - 13:18:01 | 200 | 261.569µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256" [GIN] 2025/06/07 - 13:18:01 | 200 | 215.219µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256" [GIN] 2025/06/07 - 13:18:01 | 200 | 390.819µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/models?page=1&page_size=256" [GIN] 2025/06/07 - 13:18:01 | 500 | 1.451523ms | 172.24.0.9 | POST "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/dispatch/model/schema" 2025/06/07 13:18:01 [Recovery] 2025/06/07 - 13:18:01 panic recovered: runtime error: invalid memory address or nil pointer dereference /usr/local/go/src/runtime/panic.go:262 (0x4768b8) /usr/local/go/src/runtime/signal_unix.go:917 (0x476888) /app/internal/core/plugin_manager/local_runtime/stdio.go:85 (0xdb8512) /app/internal/core/plugin_manager/local_runtime/io.go:16 (0xdb5e7a) /app/internal/core/plugin_daemon/generic.go:27 (0xfc0a36) /app/internal/core/plugin_daemon/model.gen.go:161 (0xfecceb) /app/internal/service/model.gen.go:210 (0xfeccd2) /app/internal/service/base_sse.go:116 (0xff6a9a) /app/internal/service/base_sse.go:44 (0xff6cfe) /app/internal/service/base_sse.go:114 (0xff69e4) /app/internal/service/model.gen.go:208 (0xfecc91) /app/internal/server/controllers/model.gen.go:163 (0x1cfb950) /app/internal/server/controllers/base.go:53 (0x101f5b4) /app/internal/server/controllers/base.go:31 (0x101fa34) /app/internal/server/controllers/base.go:37 (0x101f4b5) /app/internal/server/controllers/model.gen.go:160 (0x1cfb893) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:170 (0x1cfe2d3) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:97 (0x1cfe373) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:66 (0x1d02171) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf75d0a) /app/internal/server/middleware.go:24 (0x1cfdb14) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf8386e) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0xf8385b) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf829a4) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0xf8298b) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0xf81d91) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0xf81800) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0xf81331) /usr/local/go/src/net/http/server.go:3210 (0x7e062d) /usr/local/go/src/net/http/server.go:2092 (0x7bfb4f) /usr/local/go/src/runtime/asm_amd64.s:1700 (0x47caa0) [GIN] 2025/06/07 - 13:18:01 | 200 | 34.5µs | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/asset/bfff83a66922c09cb5a5aa68829742b8b4f4e818579db42f53c7b8a30912cd8b.svg" [GIN] 2025/06/07 - 13:18:04 | 200 | 1.499923ms | 172.24.0.9 | GET "/plugin/3cf018b4-64bf-4151-9d72-2419f8dfd022/management/install/tasks?page=1&page_size=100" ``` and the post url is `http://aibox:2080/console/api/workspaces/current/model-providers/langgenius/ollama/ollama/models ` body json from chrome-dev-tool is ```json {"model":"deepseek-r1:8b","model_type":"llm","credentials":{"mode":"chat","context_size":"4096","max_tokens":"4096","vision_support":"false","function_call_support":"false","base_url":"http://172.17.0.1:11434"},"load_balancing":{"enabled":false,"configs":[]}} ``` **To Reproduce** Steps to reproduce the behavior: 1. deploy dify-v1.4.1 from [release 1.4.1](https://github.com/langgenius/dify/releases/tag/1.4.1) ```shell git clone https://github.com/langgenius/dify.git cd dify git checkout 1.4.1 cd docker cp .env.example .env docker compose up -d ``` 2. goto dify page and finish account setup 3. go to model providers and install ollama 4. add model in ollama 5. click "保存/Save" and `docker logs -f docker-plugin_daemon-1` you will get panic log **Expected behavior** add ollama model **Screenshots** <img width="1804" alt="Image" src="https://github.com/user-attachments/assets/6b93150a-af45-400d-8e3a-7f09276bc1d0" /> <img width="1512" alt="Image" src="https://github.com/user-attachments/assets/679dce10-ab4a-46e9-827e-82838e34bb53" /> **Additional context** Add any other context about the problem here.
Author
Owner

@alwqx commented on GitHub (Jun 7, 2025):

TLDR: the ollama-plugin depends numpy, if not install numpy in container, the go process will panic when load ollama-plugin.

I find the key log when try to solve:

2025/06/08 02:01:56 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: Resolved 40 packages in 14ms
Downloading numpy (15.3MiB)
init process exited due to no activity for 120 seconds, retrying

Then I install numpy in plugin-daemon docker container and fixed:

docker exec -it docker-plugin_daemon-1 bash
root@a63c1e412a9d:/app# pip install numpy -i http://mirrors.tencent.com/pypi/simple --trusted-host mirrors.tencent.com
Looking in indexes: http://mirrors.tencent.com/pypi/simple
Collecting numpy
  Downloading http://mirrors.tencent.com/pypi/packages/b7/f6/bc47f5fa666d5ff4145254f9e618d56e6a4ef9b874654ca74c19113bb538/numpy-2.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (16.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 5.0 MB/s eta 0:00:00
Installing collected packages: numpy
Successfully installed numpy-2.3.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

now my container log no panic:

Image Image
@alwqx commented on GitHub (Jun 7, 2025): **TLDR: the `ollama-plugin` depends numpy, if not install numpy in container, the go process will panic when load ollama-plugin.** I find the key log when try to solve: ```shell 2025/06/08 02:01:56 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: signal: killed, output: Resolved 40 packages in 14ms Downloading numpy (15.3MiB) init process exited due to no activity for 120 seconds, retrying ``` Then I install numpy in plugin-daemon docker container and fixed: ```shell docker exec -it docker-plugin_daemon-1 bash root@a63c1e412a9d:/app# pip install numpy -i http://mirrors.tencent.com/pypi/simple --trusted-host mirrors.tencent.com Looking in indexes: http://mirrors.tencent.com/pypi/simple Collecting numpy Downloading http://mirrors.tencent.com/pypi/packages/b7/f6/bc47f5fa666d5ff4145254f9e618d56e6a4ef9b874654ca74c19113bb538/numpy-2.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (16.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 5.0 MB/s eta 0:00:00 Installing collected packages: numpy Successfully installed numpy-2.3.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv ``` now my container log no panic: <img width="1512" alt="Image" src="https://github.com/user-attachments/assets/2df1a10f-c9d3-4613-901a-291b9335f22f" /> <img width="1510" alt="Image" src="https://github.com/user-attachments/assets/4f96db6c-a19c-4a8d-bfd9-3b971fecf1a0" />
Author
Owner

@YesonWyld commented on GitHub (Jun 13, 2025):

Here are the steps I used to successfully complete the offline deployment of the plugin. It is recommended to add the following content to the local deployment manual:

  1. On a network-connected computer, normally install the required plugin and download the plugin's offline file *.difypkg.
  2. Observe the logs of the container docker-plugin_daemon-1 to ensure the plugin is fully compiled and installed.
  3. Package the plugin directory in \.dify\docker\volumes\plugin_daemon\cwd\. You will be prompted that three soft link files starting with "python" cannot be added.
  4. Stop the container docker-plugin_daemon-1 in the offline environment.
  5. Import the *.difypkg and plugin directory into the corresponding path of the offline environment. Create soft links according to the example below, then restart the container docker-plugin_daemon-1.
  6. Install the *.difypkg using the local installation method in the offline environment.
    Example:
docker exec -it docker-plugin_daemon-1 bash
cd ./storage/cwd/langgenius/ollama-0.0.6\@f430f3eb959f4863b1e87171544a8fec179441b90deda5693c85f07712d2a68c/.venv/bin/
ln -s /usr/bin/python3.12 python
ln -s python python3
ln -s python python3.12
@YesonWyld commented on GitHub (Jun 13, 2025): Here are the steps I used to successfully complete the offline deployment of the plugin. It is recommended to add the following content to the local deployment manual: 1. On a network-connected computer, normally install the required plugin and download the plugin's offline file `*.difypkg`. 2. Observe the logs of the container `docker-plugin_daemon-1` to ensure the plugin is fully compiled and installed. 3. Package the plugin directory in `\.dify\docker\volumes\plugin_daemon\cwd\`. You will be prompted that three soft link files starting with "python" cannot be added. 4. Stop the container `docker-plugin_daemon-1` in the offline environment. 5. Import the `*.difypkg` and plugin directory into the corresponding path of the offline environment. Create soft links according to the example below, then restart the container` docker-plugin_daemon-1`. 6. Install the `*.difypkg` using the local installation method in the offline environment. **Example:** <pre>docker exec -it docker-plugin_daemon-1 bash cd ./storage/cwd/langgenius/ollama-0.0.6\@f430f3eb959f4863b1e87171544a8fec179441b90deda5693c85f07712d2a68c/.venv/bin/ ln -s /usr/bin/python3.12 python ln -s python python3 ln -s python python3.12</pre>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#133