This commit is contained in:
parent
52aed4635d
commit
5296ca4f75
26
Dockerfile
26
Dockerfile
|
|
@ -2,22 +2,26 @@ FROM python:3.10-slim
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装基础构建依赖
|
||||
# ─────────────────── 系统依赖 + Node ────────────────────
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
git \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
build-essential git curl && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||
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 evalscope_ui.py /app/
|
||||
|
||||
# 安装 Gradio 源码
|
||||
# ─────────────────── 构建 Gradio 前端 ───────────────────
|
||||
RUN cd /app/gradio-5.35.0 && \
|
||||
bash scripts/build_frontend.sh
|
||||
|
||||
# ─────────────────── 安装 Python 依赖 ──────────────────
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install -e ./gradio-5.35.0
|
||||
pip install -e /app/gradio-5.35.0 && \
|
||||
pip install evalscope pyyaml
|
||||
|
||||
# 验证安装:打印版本号
|
||||
CMD ["python", "evalscope_ui.py"]
|
||||
EXPOSE 7860
|
||||
|
||||
CMD ["python", "/app/evalscope_ui.py"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue