Spaces:
Paused
Paused
Force rebuild: bust Docker cache + ensure overrides apply
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
# Clone and build from smolagents/ml-intern source
|
| 2 |
FROM node:20-alpine AS frontend-builder
|
| 3 |
RUN apk add --no-cache git
|
|
@@ -12,7 +13,7 @@ RUN useradd -m -u 1000 user
|
|
| 12 |
WORKDIR /app
|
| 13 |
RUN apt-get update && apt-get install -y --no-install-recommends git curl && rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
# Clone source
|
| 16 |
RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /tmp/source && \
|
| 17 |
cp /tmp/source/pyproject.toml /tmp/source/uv.lock ./ && \
|
| 18 |
cp -r /tmp/source/agent ./agent && \
|
|
@@ -20,15 +21,20 @@ RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /tmp/
|
|
| 20 |
cp -r /tmp/source/configs ./configs && \
|
| 21 |
rm -rf /tmp/source
|
| 22 |
|
| 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:
|
|
|
|
| 30 |
COPY backend/main.py ./backend/main.py
|
| 31 |
COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
# Create directories
|
| 34 |
RUN mkdir -p /app/session_logs && chown -R user:user /app
|
|
|
|
| 1 |
+
# CACHE_BUST=20260514_v3
|
| 2 |
# Clone and build from smolagents/ml-intern source
|
| 3 |
FROM node:20-alpine AS frontend-builder
|
| 4 |
RUN apk add --no-cache git
|
|
|
|
| 13 |
WORKDIR /app
|
| 14 |
RUN apt-get update && apt-get install -y --no-install-recommends git curl && rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
+
# Clone source code
|
| 17 |
RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /tmp/source && \
|
| 18 |
cp /tmp/source/pyproject.toml /tmp/source/uv.lock ./ && \
|
| 19 |
cp -r /tmp/source/agent ./agent && \
|
|
|
|
| 21 |
cp -r /tmp/source/configs ./configs && \
|
| 22 |
rm -rf /tmp/source
|
| 23 |
|
| 24 |
+
# Install Python dependencies
|
| 25 |
RUN uv sync --no-dev --frozen
|
| 26 |
|
| 27 |
# Copy built frontend
|
| 28 |
COPY --from=frontend-builder /source/frontend/dist ./static/
|
| 29 |
|
| 30 |
+
# ====== OVERRIDE: Apply our custom patches AFTER source clone ======
|
| 31 |
+
# This MUST come after the clone step above
|
| 32 |
COPY backend/main.py ./backend/main.py
|
| 33 |
COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json
|
| 34 |
+
# Verify override was applied
|
| 35 |
+
RUN head -3 ./backend/main.py && echo "✅ Custom main.py applied"
|
| 36 |
+
RUN cat ./configs/frontend_agent_config.json && echo "✅ Custom config applied"
|
| 37 |
+
# ====== END OVERRIDE ======
|
| 38 |
|
| 39 |
# Create directories
|
| 40 |
RUN mkdir -p /app/session_logs && chown -R user:user /app
|