From 052051eef5d8efa0f90fb3df4aae831ad3bc0aaa Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 6 Jul 2025 15:09:01 +0800 Subject: [PATCH] . --- Dockerfile | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 163f0c9..ce2f217 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,24 @@ FROM python:3.10-slim - WORKDIR /app -# ─────────────────── 系统依赖 + Node ──────────────────── +# ---------- 系统依赖 + Node + pnpm@9 ---------- RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential git curl && \ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ apt-get install -y nodejs && \ - npm install -g pnpm && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + npm install -g pnpm@9 # ← 固定 9.x -# ─────────────────── 复制源码 ─────────────────────────── +# ---------- 复制源码 ---------- COPY gradio-5.35.0 /app/gradio-5.35.0 COPY evalscope_ui.py /app/ -# ─────────────────── 构建 Gradio 前端 ─────────────────── -RUN cd /app/gradio-5.35.0 && \ - bash scripts/build_frontend.sh - -# ─────────────────── 安装 Python 依赖 ────────────────── +# ---------- 先装源码,再编前端 ---------- RUN pip install --upgrade pip && \ - pip install -e /app/gradio-5.35.0 && \ - pip install evalscope pyyaml + pip install -e /app/gradio-5.35.0 +RUN cd /app/gradio-5.35.0 && bash scripts/build_frontend.sh # 现在能成功 + +# ---------- 其余依赖 ---------- +RUN pip install evalscope pyyaml EXPOSE 7860 - CMD ["python", "/app/evalscope_ui.py"]