a8926764 commited on
Commit
d1d886d
·
verified ·
1 Parent(s): 492afa6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -5
Dockerfile CHANGED
@@ -30,7 +30,6 @@
30
 
31
  FROM node:22-slim
32
 
33
- #ENV PORT=7860
34
  ENV CI=true
35
 
36
  # 1. 系统依赖
@@ -43,19 +42,26 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
43
  ca-certificates \
44
  && rm -rf /var/lib/apt/lists/*
45
 
46
- # 2. 安装 OpenClaw非交互,稳定
 
 
 
47
  RUN npm install -g openclaw@2026.2.9 \
48
  && openclaw --version
49
 
50
  WORKDIR /app
51
 
52
- # 3. 启动脚本
53
  COPY start-openclaw.sh /usr/local/bin/start-openclaw.sh
54
  RUN chmod +x /usr/local/bin/start-openclaw.sh
55
  COPY sync.py /usr/local/bin/
56
  RUN chmod +x /usr/local/bin/sync.py
57
 
58
- #EXPOSE 7860
 
59
 
60
- CMD ["/usr/local/bin/start-openclaw.sh"]
 
 
61
 
 
 
30
 
31
  FROM node:22-slim
32
 
 
33
  ENV CI=true
34
 
35
  # 1. 系统依赖
 
42
  ca-certificates \
43
  && rm -rf /var/lib/apt/lists/*
44
 
45
+ # 2. 安装 Python 依赖huggingface_hub
46
+ RUN pip3 install --no-cache-dir huggingface_hub>=0.22.0 requests>=2.31.0
47
+
48
+ # 3. 安装 OpenClaw(非交互,稳定)
49
  RUN npm install -g openclaw@2026.2.9 \
50
  && openclaw --version
51
 
52
  WORKDIR /app
53
 
54
+ # 4. 启动脚本
55
  COPY start-openclaw.sh /usr/local/bin/start-openclaw.sh
56
  RUN chmod +x /usr/local/bin/start-openclaw.sh
57
  COPY sync.py /usr/local/bin/
58
  RUN chmod +x /usr/local/bin/sync.py
59
 
60
+ # 5. 确保目录存在
61
+ RUN mkdir -p /root/.openclaw
62
 
63
+ # 6. 验证安装
64
+ RUN python3 -c "from huggingface_hub import HfApi; print('huggingface_hub 模块导入成功')" \
65
+ && echo "依赖检查完成"
66
 
67
+ CMD ["/usr/local/bin/start-openclaw.sh"]