renminwansui1976 commited on
Commit
e570871
·
unverified ·
1 Parent(s): 9c9e8e9

更新 Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # --fix-missing: Ubuntu jammy security mirror periodically drops old python3.10
23
- # packages causing 404 errors; this flag lets apt fall back to other sources.
24
- # python3-venv installed separately after --fix-missing pass to ensure it lands.
25
  RUN apt-get update \
26
- && apt-get install -y --no-install-recommends --fix-missing \
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 into an isolated venv ─────────────────────────────────
46
- # If python3-venv failed above (very old jammy), fall back to pip --user install
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