This commit is contained in:
2025-10-21 21:35:53 +08:00
parent a570733966
commit 2f6936ce2a
2 changed files with 35 additions and 10 deletions

View File

@@ -19,17 +19,11 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
# 复制项目文件
COPY pyproject.toml ./
COPY uv.lock ./
COPY requirements.txt ./
# 安装 uv 包管理器(使用中科大 PyPI 镜像)
RUN pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ uv
# 配置中科大 PyPI 镜像源
RUN uv config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/
# 使用 uv 安装 Python 依赖
RUN uv sync --frozen
# 安装依赖(使用中科大 PyPI 镜像)
RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/
RUN pip install -r requirements.txt
# 复制应用代码
COPY . .