mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-03 02:24:36 +00:00
feat : 进一步增加超时:可以把 --timeout 120 改为 --timeout 300(5分钟)
This commit is contained in:
parent
3251c150e7
commit
3637d0f418
1 changed files with 13 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# 基础镜像(需要在云效中配置镜像加速器)
|
||||
FROM python:3.11-alpine
|
||||
FROM jsessh-registry.cn-shanghai.cr.aliyuncs.com/base-images/python:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -17,9 +17,19 @@ WORKDIR /app
|
|||
# 1.使用阿里云 Alpine 镜像源加速 apk 下载
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
# 2. 安装依赖包(使用阿里云 PyPI 镜像)
|
||||
# 2. 升级 pip 并配置镜像源
|
||||
RUN pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/ \
|
||||
--timeout 60 --retries 5 --trusted-host mirrors.aliyun.com
|
||||
|
||||
# 3. 安装依赖包(使用阿里云 PyPI 镜像,增加超时时间和重试次数)
|
||||
RUN apk add --no-cache gcc musl-dev libffi-dev wget && \
|
||||
pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ cisco-ai-skill-scanner && \
|
||||
pip install --no-cache-dir \
|
||||
-i https://mirrors.aliyun.com/pypi/simple/ \
|
||||
--timeout 120 \
|
||||
--retries 5 \
|
||||
--trusted-host mirrors.aliyun.com \
|
||||
--extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
cisco-ai-skill-scanner && \
|
||||
apk del gcc musl-dev libffi-dev
|
||||
|
||||
# 创建 app 用户和组
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue