Spaces:
Paused
Paused
Use Python script to patch frontend safely instead of sed
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
-
# Restore from 4bac0e2 + patch frontend
|
| 2 |
FROM node:20-alpine AS frontend-builder
|
| 3 |
-
RUN apk add --no-cache git
|
| 4 |
RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /source
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
WORKDIR /source/frontend
|
| 10 |
RUN npm install && npm run build
|
|
@@ -28,7 +29,7 @@ RUN uv sync --no-dev --frozen
|
|
| 28 |
COPY --from=frontend-builder /source/frontend/dist ./static/
|
| 29 |
COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
|
| 30 |
|
| 31 |
-
# Patch backend:
|
| 32 |
COPY patch_models.py /tmp/patch_models.py
|
| 33 |
RUN python /tmp/patch_models.py
|
| 34 |
|
|
|
|
| 1 |
+
# Restore from 4bac0e2 + patch frontend + backend models
|
| 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
|
| 5 |
|
| 6 |
+
# Patch frontend: add Gemini + Qwen3 models to dropdown
|
| 7 |
+
COPY patch_frontend.py /tmp/patch_frontend.py
|
| 8 |
+
RUN python3 /tmp/patch_frontend.py
|
| 9 |
|
| 10 |
WORKDIR /source/frontend
|
| 11 |
RUN npm install && npm run build
|
|
|
|
| 29 |
COPY --from=frontend-builder /source/frontend/dist ./static/
|
| 30 |
COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
|
| 31 |
|
| 32 |
+
# Patch backend: accept new model IDs
|
| 33 |
COPY patch_models.py /tmp/patch_models.py
|
| 34 |
RUN python /tmp/patch_models.py
|
| 35 |
|