Offline Environment Failure: Plugin Still Attempts to Install dify_plugin from PyPI Despite Configuration Changes (Network Timeout) #20

Closed
opened 2026-02-16 00:19:05 -05:00 by yindo · 7 comments
Owner

Originally created by @jun0315 on GitHub (Mar 1, 2025).

Issue Content
Description
When deploying Dify v1.0 in an air-gapped (offline) environment, saving API-based model configurations triggers an attempt to install dify_plugin==0.0.1b65 from PyPI, even after:

Image

Setting up a local PyPI mirror for the plugin.
Manually installing the plugin .whl file.
This results in network timeouts (see logs below) and breaks model setup workflows in offline scenarios.

Image

Use the plugin openai_api_compatible to save the LLM model

Originally created by @jun0315 on GitHub (Mar 1, 2025). Issue Content Description When deploying Dify v1.0 in an air-gapped (offline) environment, saving API-based model configurations triggers an attempt to install dify_plugin==0.0.1b65 from PyPI, even after: <img width="959" alt="Image" src="https://github.com/user-attachments/assets/edb6297c-14f3-48c2-beb8-272932f8604c" /> Setting up a local PyPI mirror for the plugin. Manually installing the plugin .whl file. This results in network timeouts (see logs below) and breaks model setup workflows in offline scenarios. ![Image](https://github.com/user-attachments/assets/77f8e700-0459-4222-8605-8cd4c4a20d39) Use the plugin openai_api_compatible to save the LLM model
yindo closed this issue 2026-02-16 00:19:05 -05:00
Author
Owner

@jun0315 commented on GitHub (Mar 1, 2025):

COPY go.mod go.sum /app/
WORKDIR /app
RUN go mod download

COPY . /app

using goproxy if you have network issues

ENV GOPROXY=https://goproxy.cn,direct

RUN GGO_ENABLED=0 go build
-ldflags "
-X 'github.com/langgenius/dify-plugin-daemon/internal/manifest.VersionX=${VERSION}'
-X 'github.com/langgenius/dify-plugin-daemon/internal/manifest.BuildTimeX=$(date -u +%Y-%m-%dT%H:%M:%S%z)'"
-o /app/main cmd/server/main.go

copy entrypoint.sh

COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

FROM ubuntu:24.04

COPY --from=builder /app/main /app/main
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh

WORKDIR /app

check build args

ARG PLATFORM=local

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y
python3.12
python3.12-venv
python3.12-dev
ffmpeg
python3-pip \
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
&& pip3 install --no-cache-dir --break-system-packages dify_plugin==0.0.1b65

This is my dockerfile. I built the library containing dify_plugin==0.0.1b65myself, but it still reports an error. By the way, we can use cache to increase the download speed of go.

@jun0315 commented on GitHub (Mar 1, 2025): COPY go.mod go.sum /app/ WORKDIR /app RUN go mod download COPY . /app # using goproxy if you have network issues ENV GOPROXY=https://goproxy.cn,direct RUN GGO_ENABLED=0 go build \ -ldflags "\ -X 'github.com/langgenius/dify-plugin-daemon/internal/manifest.VersionX=${VERSION}' \ -X 'github.com/langgenius/dify-plugin-daemon/internal/manifest.BuildTimeX=$(date -u +%Y-%m-%dT%H:%M:%S%z)'" \ -o /app/main cmd/server/main.go # copy entrypoint.sh COPY entrypoint.sh /app/entrypoint.sh RUN chmod +x /app/entrypoint.sh FROM ubuntu:24.04 COPY --from=builder /app/main /app/main COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh WORKDIR /app # check build args ARG PLATFORM=local RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ python3.12 \ python3.12-venv \ python3.12-dev \ ffmpeg \ python3-pip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 \ && pip3 install --no-cache-dir --break-system-packages dify_plugin==0.0.1b65 This is my dockerfile. I built the library containing dify_plugin==0.0.1b65myself, but it still reports an error. By the way, we can use cache to increase the download speed of go.
Author
Owner

@templaryang commented on GitHub (Mar 1, 2025):

I am facing the same issue in offline server. Have you fix this issue?

Image

@templaryang commented on GitHub (Mar 1, 2025): I am facing the same issue in offline server. Have you fix this issue? ![Image](https://github.com/user-attachments/assets/3c8cd8fb-4db2-4204-a04a-fa75d1f4363c)
Author
Owner

@zhuoyankun commented on GitHub (Mar 4, 2025):

you can add the configuration of PIP_MIRROR_URL

@zhuoyankun commented on GitHub (Mar 4, 2025): you can add the configuration of PIP_MIRROR_URL
Author
Owner

@Yeuoly commented on GitHub (Mar 5, 2025):

PIP_MIRROR_URL cloud solve it

@Yeuoly commented on GitHub (Mar 5, 2025): PIP_MIRROR_URL cloud solve it
Author
Owner

@Yeuoly commented on GitHub (Mar 10, 2025):

pls set PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple

@Yeuoly commented on GitHub (Mar 10, 2025): pls set PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
Author
Owner

@Mzq12138 commented on GitHub (Mar 14, 2025):

@jun0315 Which docker image should I install the pypi dependencies? dify-plugin-daemon? or dify-worker? or dify-api? or something else?

@Mzq12138 commented on GitHub (Mar 14, 2025): @jun0315 Which docker image should I install the pypi dependencies? dify-plugin-daemon? or dify-worker? or dify-api? or something else?
Author
Owner

@lsqtongxin commented on GitHub (Mar 14, 2025):

in the offline environment or local network, install a nexus repository in your local network。 put the dependencies import to the nexus repository, then the plugin-daemon pull the dependencies.

@lsqtongxin commented on GitHub (Mar 14, 2025): in the offline environment or local network, install a nexus repository in your local network。 put the dependencies import to the nexus repository, then the plugin-daemon pull the dependencies.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#20