devratharaisaar commited on
Commit
9aa1bda
·
verified ·
1 Parent(s): 1501baf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -10
Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM node:20-bookworm
2
 
3
  SHELL ["/bin/bash", "-c"]
4
 
5
- # Install minimal dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  curl \
@@ -10,19 +10,24 @@ RUN apt-get update && apt-get install -y \
10
  python3-pip \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Fix PEP668 restriction
14
  RUN pip3 install --no-cache-dir --break-system-packages huggingface_hub
15
 
16
- # Install OpenClaw globally
17
- RUN npm install -g @openclaw/openclaw
18
 
19
- # Workspace
20
- RUN mkdir -p /home/node/.openclaw
21
- WORKDIR /home/node
22
 
23
- ENV NODE_ENV=production
24
- ENV OPENCLAW_HOME=/home/node/.openclaw
25
 
 
 
 
 
 
 
 
26
  EXPOSE 7860
27
 
28
- CMD ["openclaw", "gateway"]
 
2
 
3
  SHELL ["/bin/bash", "-c"]
4
 
5
+ # Install dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  curl \
 
10
  python3-pip \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Allow pip install on Debian
14
  RUN pip3 install --no-cache-dir --break-system-packages huggingface_hub
15
 
16
+ # Install pnpm
17
+ RUN corepack enable
18
 
19
+ # Clone OpenClaw
20
+ RUN git clone https://github.com/openclaw/openclaw.git /openclaw
 
21
 
22
+ WORKDIR /openclaw
 
23
 
24
+ # Install dependencies
25
+ RUN pnpm install
26
+
27
+ # Build OpenClaw
28
+ RUN pnpm build
29
+
30
+ # HF Space port
31
  EXPOSE 7860
32
 
33
+ CMD ["node","dist/entry.js"]