File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,18 +62,19 @@ WORKDIR /app
6262# 复制项目文件
6363COPY . /app/
6464
65+ # 下载预编译的 pydensecrf wheel(从 GitHub Release)
66+ RUN wget -q https://github.com/hgmzhn/manga-translator-ui/releases/download/v1.9.2/pydensecrf-1.0-cp312-cp312-linux_x86_64.whl -O /tmp/pydensecrf.whl
67+
6568# 安装 Python 依赖
6669ARG BUILD_TYPE=cpu
6770RUN if [ "$BUILD_TYPE" = "gpu" ]; then \
68- # GPU 版本:先安装 pydensecrf 从源码,然后安装其他依赖
69- pip install --no-cache-dir Cython numpy && \
70- pip install --no-cache-dir git+https://github.com/lucasb-eyer/pydensecrf.git && \
71+ # GPU 版本:先安装预编译的 pydensecrf,然后安装其他依赖
72+ pip install --no-cache-dir /tmp/pydensecrf.whl && \
7173 grep -v "pydensecrf" requirements_gpu.txt > /tmp/requirements_gpu_no_pydensecrf.txt && \
7274 pip install --no-cache-dir -r /tmp/requirements_gpu_no_pydensecrf.txt; \
7375 else \
74- # CPU 版本:先安装 pydensecrf 从源码,然后安装其他依赖
75- pip install --no-cache-dir Cython numpy && \
76- pip install --no-cache-dir git+https://github.com/lucasb-eyer/pydensecrf.git && \
76+ # CPU 版本:先安装预编译的 pydensecrf,然后安装其他依赖
77+ pip install --no-cache-dir /tmp/pydensecrf.whl && \
7778 grep -v "pydensecrf" requirements_cpu.txt > /tmp/requirements_cpu_no_pydensecrf.txt && \
7879 pip install --no-cache-dir -r /tmp/requirements_cpu_no_pydensecrf.txt; \
7980 fi
You can’t perform that action at this time.
0 commit comments