mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-21 17:25:23 -04:00
Offline Environment Failure: Plugin Still Attempts to Install dify_plugin from PyPI Despite Configuration Changes (Network Timeout) #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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.
Use the plugin openai_api_compatible to save the LLM model
@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.
@templaryang commented on GitHub (Mar 1, 2025):
I am facing the same issue in offline server. Have you fix this issue?
@zhuoyankun commented on GitHub (Mar 4, 2025):
you can add the configuration of PIP_MIRROR_URL
@Yeuoly commented on GitHub (Mar 5, 2025):
PIP_MIRROR_URL cloud solve it
@Yeuoly commented on GitHub (Mar 10, 2025):
pls set PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
@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?
@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.