This commit is contained in:
parent
59fda1cb3d
commit
052051eef5
22
Dockerfile
22
Dockerfile
|
|
@ -1,28 +1,24 @@
|
||||||
FROM python:3.10-slim
|
FROM python:3.10-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# ─────────────────── 系统依赖 + Node ────────────────────
|
# ---------- 系统依赖 + Node + pnpm@9 ----------
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
build-essential git curl && \
|
build-essential git curl && \
|
||||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||||
apt-get install -y nodejs && \
|
apt-get install -y nodejs && \
|
||||||
npm install -g pnpm && \
|
npm install -g pnpm@9 # ← 固定 9.x
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# ─────────────────── 复制源码 ───────────────────────────
|
# ---------- 复制源码 ----------
|
||||||
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 前端 ───────────────────
|
# ---------- 先装源码,再编前端 ----------
|
||||||
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 /app/gradio-5.35.0 && \
|
pip install -e /app/gradio-5.35.0
|
||||||
pip install evalscope pyyaml
|
RUN cd /app/gradio-5.35.0 && bash scripts/build_frontend.sh # 现在能成功
|
||||||
|
|
||||||
|
# ---------- 其余依赖 ----------
|
||||||
|
RUN pip install evalscope pyyaml
|
||||||
|
|
||||||
EXPOSE 7860
|
EXPOSE 7860
|
||||||
|
|
||||||
CMD ["python", "/app/evalscope_ui.py"]
|
CMD ["python", "/app/evalscope_ui.py"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue