Spaces:
Paused
Paused
Restore 4bac0e2 + add Gemini/Qwen3 to dropdown via build-time patch
Browse files- Dockerfile +6 -11
Dockerfile
CHANGED
|
@@ -1,12 +1,7 @@
|
|
| 1 |
-
#
|
| 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 |
-
# Patch frontend model options BEFORE npm build
|
| 7 |
-
RUN sed -i 's/const DEFAULT_MODEL_OPTIONS: ModelOption\[\] = \[/const DEFAULT_MODEL_OPTIONS: ModelOption[] = [\n { id: "deepseek-v3", name: "DeepSeek V3", description: "OpenRouter", modelPath: "deepseek\/deepseek-chat-v3-0324", avatarUrl: "https:\/\/huggingface.co\/api\/avatars\/deepseek-ai", recommended: true },\n { id: "gemini-flash", name: "Gemini 2.0 Flash", description: "OpenRouter", modelPath: "google\/gemini-2.0-flash-001", avatarUrl: "https:\/\/huggingface.co\/api\/avatars\/google", recommended: true },\n { id: "qwen3-30b", name: "Qwen3 30B", description: "OpenRouter", modelPath: "qwen\/qwen3-30b-a3b", avatarUrl: "https:\/\/huggingface.co\/api\/avatars\/Qwen" },\n { id: "deepseek-v4", name: "DeepSeek V4 Pro", description: "OpenRouter", modelPath: "deepseek-ai\/DeepSeek-V4-Pro:deepinfra", avatarUrl: "https:\/\/huggingface.co\/api\/avatars\/deepseek-ai" },/' /source/frontend/src/components/Chat/ChatInput.tsx
|
| 8 |
-
RUN grep "DeepSeek V3" /source/frontend/src/components/Chat/ChatInput.tsx && echo "✅ Frontend patched"
|
| 9 |
-
|
| 10 |
WORKDIR /source/frontend
|
| 11 |
RUN npm install && npm run build
|
| 12 |
|
|
@@ -28,15 +23,15 @@ RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /tmp/
|
|
| 28 |
# Install dependencies
|
| 29 |
RUN uv sync --no-dev --frozen
|
| 30 |
|
| 31 |
-
# Copy
|
| 32 |
COPY --from=frontend-builder /source/frontend/dist ./static/
|
| 33 |
|
| 34 |
# Override config
|
| 35 |
COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
|
| 36 |
|
| 37 |
-
# Patch
|
| 38 |
-
COPY
|
| 39 |
-
RUN python /tmp/
|
| 40 |
|
| 41 |
# Create directories
|
| 42 |
RUN mkdir -p /app/session_logs && chown -R user:user /app
|
|
|
|
| 1 |
+
# Restore from 4bac0e2 + patch models dropdown
|
| 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 |
WORKDIR /source/frontend
|
| 6 |
RUN npm install && npm run build
|
| 7 |
|
|
|
|
| 23 |
# Install dependencies
|
| 24 |
RUN uv sync --no-dev --frozen
|
| 25 |
|
| 26 |
+
# Copy built frontend
|
| 27 |
COPY --from=frontend-builder /source/frontend/dist ./static/
|
| 28 |
|
| 29 |
# Override config
|
| 30 |
COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
|
| 31 |
|
| 32 |
+
# Patch: Add Gemini + Qwen3 to models dropdown + fix title generation
|
| 33 |
+
COPY patch_models.py /tmp/patch_models.py
|
| 34 |
+
RUN python /tmp/patch_models.py
|
| 35 |
|
| 36 |
# Create directories
|
| 37 |
RUN mkdir -p /app/session_logs && chown -R user:user /app
|