bep40 commited on
Commit
867a67d
·
verified ·
1 Parent(s): 3b5cf7d

Use V2 patch for auto-continue - fix all TS errors

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -12
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Restore from 4bac0e2 + patch frontend + backend models + auto-continue
2
  FROM node:20-alpine AS frontend-builder
3
  RUN apk add --no-cache git python3
4
  RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /source
@@ -7,15 +7,9 @@ RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /sour
7
  COPY patch_frontend.py /tmp/patch_frontend.py
8
  RUN python3 /tmp/patch_frontend.py
9
 
10
- # Patch auto-continue feature for free models
11
- COPY patch_use_agent_chat_full.py /tmp/patch_use_agent_chat_full.py
12
- RUN python3 /tmp/patch_use_agent_chat_full.py
13
-
14
- COPY patch_chat_input.py /tmp/patch_chat_input.py
15
- RUN python3 /tmp/patch_chat_input.py
16
-
17
- COPY patch_sse_transport.py /tmp/patch_sse_transport.py
18
- RUN python3 /tmp/patch_sse_transport.py
19
 
20
  WORKDIR /source/frontend
21
  RUN npm config set fetch-timeout 120000 && \
@@ -42,10 +36,11 @@ RUN uv sync --no-dev --frozen
42
  COPY --from=frontend-builder /source/frontend/dist ./static/
43
  COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
44
 
45
- # Patch backend: accept new model IDs + auto-continue
46
  COPY patch_models.py /tmp/patch_models.py
47
  RUN python /tmp/patch_models.py
48
 
 
49
  COPY patch_agent_loop.py /tmp/patch_agent_loop.py
50
  RUN python /tmp/patch_agent_loop.py || echo "agent_loop patch not applied (may need adjustment)"
51
 
@@ -59,5 +54,4 @@ ENV HOME=/home/user \
59
 
60
  EXPOSE 7860
61
  WORKDIR /app/backend
62
- # python:slim does not include bash by default; start.sh is POSIX-compatible.
63
  CMD ["sh", "start.sh"]
 
1
+ # Restore from 4bac0e2 + patch frontend + backend models + auto-continue V2
2
  FROM node:20-alpine AS frontend-builder
3
  RUN apk add --no-cache git python3
4
  RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /source
 
7
  COPY patch_frontend.py /tmp/patch_frontend.py
8
  RUN python3 /tmp/patch_frontend.py
9
 
10
+ # Patch auto-continue V2: fix all TS errors
11
+ COPY patch_auto_continue_v2.py /tmp/patch_auto_continue_v2.py
12
+ RUN python3 /tmp/patch_auto_continue_v2.py
 
 
 
 
 
 
13
 
14
  WORKDIR /source/frontend
15
  RUN npm config set fetch-timeout 120000 && \
 
36
  COPY --from=frontend-builder /source/frontend/dist ./static/
37
  COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
38
 
39
+ # Patch backend: accept new model IDs
40
  COPY patch_models.py /tmp/patch_models.py
41
  RUN python /tmp/patch_models.py
42
 
43
+ # Patch backend: auto-continue detection
44
  COPY patch_agent_loop.py /tmp/patch_agent_loop.py
45
  RUN python /tmp/patch_agent_loop.py || echo "agent_loop patch not applied (may need adjustment)"
46
 
 
54
 
55
  EXPOSE 7860
56
  WORKDIR /app/backend
 
57
  CMD ["sh", "start.sh"]