Tonic commited on
Commit
7b2d99b
·
verified ·
1 Parent(s): 8bdcbff

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -4,8 +4,8 @@
4
  FROM node:22-bookworm
5
 
6
  # Optional: point to a fork or branch (set in Space Variables)
7
- ARG OPENCLAW_REPO=https://github.com/Josephrp/openclaw.git
8
- ARG OPENCLAW_REF=hf-spaces
9
 
10
  # Install git and Bun (needed for build scripts)
11
  RUN apt-get update && \
@@ -30,7 +30,7 @@ ENV NODE_ENV=production
30
  # Spaces expose a single port (default 7860); gateway must listen on 0.0.0.0
31
  EXPOSE 7860
32
 
33
- # Entrypoint: use /data if writable (persistent storage), else /home/user so we don't get EACCES
34
  RUN printf '%s\n' \
35
  '#!/bin/sh' \
36
  'set -e' \
@@ -40,6 +40,7 @@ RUN printf '%s\n' \
40
  ' export OPENCLAW_HOME=/home/user' \
41
  ' mkdir -p /home/user/.openclaw' \
42
  'fi' \
 
43
  'exec node /app/openclaw.mjs gateway --allow-unconfigured --bind lan --port 7860 "$@"' \
44
  > /app/entrypoint.sh \
45
  && chmod +x /app/entrypoint.sh
 
4
  FROM node:22-bookworm
5
 
6
  # Optional: point to a fork or branch (set in Space Variables)
7
+ ARG OPENCLAW_REPO=https://github.com/openclaw/openclaw.git
8
+ ARG OPENCLAW_REF=main
9
 
10
  # Install git and Bun (needed for build scripts)
11
  RUN apt-get update && \
 
30
  # Spaces expose a single port (default 7860); gateway must listen on 0.0.0.0
31
  EXPOSE 7860
32
 
33
+ # Entrypoint: set OPENCLAW_HOME, run HF Spaces setup (default model + token from secrets), then start gateway
34
  RUN printf '%s\n' \
35
  '#!/bin/sh' \
36
  'set -e' \
 
40
  ' export OPENCLAW_HOME=/home/user' \
41
  ' mkdir -p /home/user/.openclaw' \
42
  'fi' \
43
+ 'node /app/spaces/huggingface/setup-hf-config.mjs' \
44
  'exec node /app/openclaw.mjs gateway --allow-unconfigured --bind lan --port 7860 "$@"' \
45
  > /app/entrypoint.sh \
46
  && chmod +x /app/entrypoint.sh