This commit is contained in:
hailin 2025-07-06 15:05:50 +08:00
parent 52aed4635d
commit 5296ca4f75
1 changed files with 15 additions and 11 deletions

View File

@ -2,22 +2,26 @@ FROM python:3.10-slim
WORKDIR /app WORKDIR /app
# 安装基础构建依赖 # ─────────────────── 系统依赖 + Node ────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \ build-essential git curl && \
git \ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
&& apt-get clean && rm -rf /var/lib/apt/lists/* apt-get install -y nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# 拷贝 Gradio 源码(注意路径) # ─────────────────── 复制源码 ───────────────────────────
COPY gradio-5.35.0 /app/gradio-5.35.0 COPY gradio-5.35.0 /app/gradio-5.35.0
# 拷贝 应用 源码(注意路径)
COPY evalscope_ui.py /app/ COPY evalscope_ui.py /app/
# 安装 Gradio 源码 # ─────────────────── 构建 Gradio 前端 ───────────────────
RUN cd /app/gradio-5.35.0 && \
bash scripts/build_frontend.sh
# ─────────────────── 安装 Python 依赖 ──────────────────
RUN pip install --upgrade pip && \ RUN pip install --upgrade pip && \
pip install -e ./gradio-5.35.0 pip install -e /app/gradio-5.35.0 && \
pip install evalscope pyyaml
# 验证安装:打印版本号 EXPOSE 7860
CMD ["python", "evalscope_ui.py"]
CMD ["python", "/app/evalscope_ui.py"]