Skip to content

Commit a953bf8

Browse files
committed
use public pypi source
1 parent 1812afd commit a953bf8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

api/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ WORKDIR /app/api
66
# Install uv
77
ENV UV_VERSION=0.6.14
88

9-
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ uv==${UV_VERSION}
9+
# 2024-12-19: 修改为官方 PyPI 源,解决网络超时问题
10+
# 原配置: RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple uv==${UV_VERSION}
11+
# 修改原因: 清华源和阿里云源都出现网络超时,改用官方源提高稳定性
12+
RUN pip install --no-cache-dir uv==${UV_VERSION}
1013

1114

1215
FROM base AS packages
@@ -19,7 +22,11 @@ RUN apt-get update \
1922

2023
# Install Python dependencies
2124
COPY pyproject.toml uv.lock ./
22-
RUN uv sync --index-url https://mirrors.aliyun.com/pypi/simple/
25+
# 2024-12-19: 修改为官方 PyPI 源,解决网络超时问题
26+
# 原配置: RUN uv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple
27+
# 修改原因: 清华源和阿里云源都出现网络超时,改用官方源提高稳定性
28+
# 使用官方源,并设置更长的超时时间
29+
RUN uv sync --timeout 600
2330

2431
# production stage
2532
FROM base AS production

0 commit comments

Comments
 (0)