Sanyam400 commited on
Commit
13f12f7
Β·
verified Β·
1 Parent(s): d0bbb7c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # ============================================================
2
- # Hermes Agent β€” Self-contained HF Spaces deployment (Stable v7.9)
3
  # Single Dockerfile: Gateway + Dashboard + Chat WebUI + Router
4
  #
5
  # HOW TO DEPLOY:
@@ -41,7 +41,6 @@ ENV PYTHONUNBUFFERED=1 \
41
  TERM=xterm-256color \
42
  SHELL=/bin/bash \
43
  SYNC_INTERVAL=30 \
44
- HF_HOME=/tmp/.hf_home \
45
  # ── BROWSER FIX: Force --no-sandbox + --disable-dev-shm-usage for ALL
46
  # Chromium launches. HuggingFace Spaces (like most containers/VMs) runs
47
  # with AppArmor unprivileged user namespace restrictions enabled, which
@@ -67,12 +66,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
67
  && rm -rf /var/lib/apt/lists/* \
68
  && uv pip install --python /opt/hermes/.venv/bin/python \
69
  --no-cache-dir "huggingface_hub>=0.22" pyyaml \
70
- # FIX: Install Hugging Face CLI binary securely and mirror it to public directories
71
- # with global execution privileges to prevent "hf: command not found" inside unprivileged containers
72
- && curl -LsSf https://hf.co/cli/install.sh | bash \
73
- && if [ -f /root/.local/bin/hf ]; then cp /root/.local/bin/hf /usr/local/bin/hf; fi \
74
- && cp /usr/local/bin/hf /usr/bin/hf || true \
75
- && chmod a+rx /usr/local/bin/hf /usr/bin/hf || true
76
 
77
  # ── Clone Hermes WebUI ────────────────────────────────────────
78
  RUN git clone --depth 1 https://github.com/nesquena/hermes-webui.git /opt/hermes-webui \
@@ -539,6 +536,9 @@ RUN find /opt/hermes/.playwright -type f -name "chrome" | while read -r chrome_b
539
  RUN cat > /opt/start.sh << 'ENDSH'
540
  #!/usr/bin/env bash
541
  set -euo pipefail
 
 
 
542
  export PATH="/opt/hermes/.venv/bin:/opt/data/.local/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
543
 
544
  HH="${HERMES_HOME:-/data}"
 
1
  # ============================================================
2
+ # Hermes Agent β€” Self-contained HF Spaces deployment (Stable v8.0)
3
  # Single Dockerfile: Gateway + Dashboard + Chat WebUI + Router
4
  #
5
  # HOW TO DEPLOY:
 
41
  TERM=xterm-256color \
42
  SHELL=/bin/bash \
43
  SYNC_INTERVAL=30 \
 
44
  # ── BROWSER FIX: Force --no-sandbox + --disable-dev-shm-usage for ALL
45
  # Chromium launches. HuggingFace Spaces (like most containers/VMs) runs
46
  # with AppArmor unprivileged user namespace restrictions enabled, which
 
66
  && rm -rf /var/lib/apt/lists/* \
67
  && uv pip install --python /opt/hermes/.venv/bin/python \
68
  --no-cache-dir "huggingface_hub>=0.22" pyyaml \
69
+ # FIX: Install Hugging Face CLI binary directly to /usr/local/bin to prevent
70
+ # permission access failures for unprivileged users (avoiding "hf: command not found")
71
+ && curl -LsSf https://hf.co/cli/install.sh | BINDIR=/usr/local/bin sh \
72
+ && chmod a+rx /usr/local/bin/hf || true
 
 
73
 
74
  # ── Clone Hermes WebUI ────────────────────────────────────────
75
  RUN git clone --depth 1 https://github.com/nesquena/hermes-webui.git /opt/hermes-webui \
 
536
  RUN cat > /opt/start.sh << 'ENDSH'
537
  #!/usr/bin/env bash
538
  set -euo pipefail
539
+
540
+ # FIX: Explicitly prepend /usr/local/bin to PATH to guarantee the globally installed
541
+ # 'hf' binary is natively discoverable by start.sh running under the 'hermes' user scope.
542
  export PATH="/opt/hermes/.venv/bin:/opt/data/.local/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
543
 
544
  HH="${HERMES_HOME:-/data}"