Claude Code commited on
Commit
8e382ba
·
1 Parent(s): 0ede581

god: manual intervention patch - Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -36
Dockerfile CHANGED
@@ -1,36 +1,4 @@
1
- # Minimal Python Dockerfile for Cain - fast cold start
2
- FROM python:3.9-slim
3
-
4
- # Build metadata
5
- LABEL space_id="tao-shen/HuggingClaw-Cain"
6
- LABEL sdk="docker"
7
- LABEL port="7860"
8
-
9
- # Create /app directory for application and /data for persistent storage
10
- RUN mkdir -p /app /data && chmod 777 /data
11
- WORKDIR /app
12
-
13
- # Copy requirements and install (layer cache optimization)
14
- COPY requirements.txt /tmp/
15
- RUN pip install --no-cache-dir -r /tmp/requirements.txt
16
-
17
- # Copy all application files - combined layer for faster builds
18
- COPY app.py error_handlers.py entrypoint.sh openclaw.json /app/
19
- COPY static/ /app/static/
20
- COPY frontend/ /app/frontend/
21
-
22
- # CRITICAL: Copy openclaw/ directory with nested structure
23
- # openclaw/__init__.py is needed for "import openclaw" to work
24
- # openclaw/.openclaw/ is needed for "from agents import brain_minimal" to work
25
- COPY openclaw/ /app/openclaw/
26
-
27
- # Create necessary directories with proper permissions
28
- RUN mkdir -p /app/logs && \
29
- chmod +x /app/entrypoint.sh && \
30
- chmod 777 /app/logs /app/openclaw/.openclaw
31
-
32
- # PORT is set by HuggingFace Spaces - no hardcoded ENV here to avoid collision
33
- EXPOSE 7860
34
-
35
- # Use entrypoint for better startup logging
36
- ENTRYPOINT ["/app/entrypoint.sh"]
 
1
+ # Fix entrypoint path and permissions
2
+ COPY entrypoint.sh /entrypoint.sh
3
+ RUN chmod +x /entrypoint.sh
4
+ ENTRYPOINT ["/entrypoint.sh"]