From 36641584d940653db456a8a6b3436853af29c887 Mon Sep 17 00:00:00 2001 From: oficcejo Date: Sun, 12 Oct 2025 15:55:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=99=BA=E7=AD=96=E6=9D=BF?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0ec1a64..eee57bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,11 @@ RUN node --version && npm --version # 复制依赖文件 COPY requirements.txt . -# 安装Python依赖 -RUN pip install --no-cache-dir -r requirements.txt +# 安装Python依赖 - 修改后的部分 +# 永久配置pip使用国内镜像源并增加超时时间[1](@ref)[2](@ref) +RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ && \ + pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn && \ + pip install --no-cache-dir --default-timeout=1000 -r requirements.txt # 复制项目文件 COPY . .