构建报错
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 11m27s

This commit is contained in:
2026-04-21 23:15:35 +08:00
parent 51089bbf15
commit 38646001e6
3 changed files with 11 additions and 12 deletions

View File

@@ -59,13 +59,12 @@ ENV DEBUG=false
# 安装依赖
# =============================================================================
# 复制本地模型文件到镜像(如果有)
COPY docker/models/*.whl /tmp/models/ 2>/dev/null || true
# 注意:docker/models/ 目录需要在构建上下文中存在
COPY docker/models/ /tmp/models/
# 安装本地模型 wheel如果有
RUN if [ -n "$(ls -A /tmp/models/ 2>/dev/null)" ]; then \
pip install --no-cache-dir /tmp/models/*.whl && \
rm -rf /tmp/models; \
fi
# 安装本地模型 wheel如果有 .whl 文件
RUN find /tmp/models -name "*.whl" -type f 2>/dev/null | head -1 | xargs -r pip install --no-cache-dir && \
rm -rf /tmp/models
# 设置 pip 国内镜像源
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple