Spaces:
Running
Running
更新 Dockerfile
Browse files- Dockerfile +7 -18
Dockerfile
CHANGED
|
@@ -19,16 +19,14 @@ FROM mcr.microsoft.com/playwright:v1.51.0-jammy AS runtime
|
|
| 19 |
USER root
|
| 20 |
|
| 21 |
# ── 2a. System deps ────────────────────────────────────────────────────────────
|
| 22 |
-
#
|
| 23 |
-
#
|
| 24 |
-
#
|
| 25 |
RUN apt-get update \
|
| 26 |
-
&& apt-get install -y --no-install-recommends
|
| 27 |
git tini ca-certificates curl \
|
| 28 |
cmake make build-essential \
|
| 29 |
-
python3 \
|
| 30 |
-
&& apt-get install -y --no-install-recommends --fix-missing \
|
| 31 |
-
python3-venv \
|
| 32 |
&& rm -rf /var/lib/apt/lists/*
|
| 33 |
|
| 34 |
# ── 2b. Install Node 22 (OpenClaw requires ≥22; Playwright ships Node 20) ─────
|
|
@@ -42,17 +40,8 @@ RUN SHARP_IGNORE_GLOBAL_LIBVIPS=1 \
|
|
| 42 |
npm install -g openclaw@latest \
|
| 43 |
&& rm -rf /tmp/npm-cache
|
| 44 |
|
| 45 |
-
# ── 2d. Install LiteLLM
|
| 46 |
-
|
| 47 |
-
RUN if python3 -m venv /opt/litellm-venv 2>/dev/null; then \
|
| 48 |
-
/opt/litellm-venv/bin/pip install --no-cache-dir "litellm[proxy]"; \
|
| 49 |
-
else \
|
| 50 |
-
pip3 install --no-cache-dir --break-system-packages "litellm[proxy]"; \
|
| 51 |
-
mkdir -p /opt/litellm-venv/bin; \
|
| 52 |
-
ln -sf "$(which litellm)" /opt/litellm-venv/bin/litellm; \
|
| 53 |
-
fi
|
| 54 |
-
|
| 55 |
-
ENV PATH="/opt/litellm-venv/bin:$PATH"
|
| 56 |
|
| 57 |
# ── 2e. Copy Rust sync binary + startup script ────────────────────────────────
|
| 58 |
COPY --from=builder /app/target/release/openclaw-hf-sync /usr/local/bin/openclaw-hf-sync
|
|
|
|
| 19 |
USER root
|
| 20 |
|
| 21 |
# ── 2a. System deps ────────────────────────────────────────────────────────────
|
| 22 |
+
# NOTE: python3-venv is intentionally omitted.
|
| 23 |
+
# Ubuntu jammy security mirror has removed python3.10-venv (404), which makes
|
| 24 |
+
# dpkg fail at configure time even with --fix-missing. We use pip directly instead.
|
| 25 |
RUN apt-get update \
|
| 26 |
+
&& apt-get install -y --no-install-recommends \
|
| 27 |
git tini ca-certificates curl \
|
| 28 |
cmake make build-essential \
|
| 29 |
+
python3 python3-pip \
|
|
|
|
|
|
|
| 30 |
&& rm -rf /var/lib/apt/lists/*
|
| 31 |
|
| 32 |
# ── 2b. Install Node 22 (OpenClaw requires ≥22; Playwright ships Node 20) ─────
|
|
|
|
| 40 |
npm install -g openclaw@latest \
|
| 41 |
&& rm -rf /tmp/npm-cache
|
| 42 |
|
| 43 |
+
# ── 2d. Install LiteLLM via pip (no venv — jammy's python3.10-venv is broken) ─
|
| 44 |
+
RUN pip3 install --no-cache-dir --break-system-packages "litellm[proxy]"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
# ── 2e. Copy Rust sync binary + startup script ────────────────────────────────
|
| 47 |
COPY --from=builder /app/target/release/openclaw-hf-sync /usr/local/bin/openclaw-hf-sync
|