Spaces:
Running
Running
Download Dockerfile from bep40/Space-Mutiverse-Control: direct link, hf CLI and curl.
- Browser
- Download file 1.55 kB
-
https://huggingface.co/spaces/bep40/Space-Mutiverse-Control/resolve/9fca8b2a5441775dbfb94de83c7f27405ddcece3/Dockerfile
- Command line
-
hf download hf://spaces/bep40/Space-Mutiverse-Control@9fca8b2a5441775dbfb94de83c7f27405ddcece3/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/bep40/Space-Mutiverse-Control/resolve/9fca8b2a5441775dbfb94de83c7f27405ddcece3/Dockerfile
1.55 kB
| # Rebuild: fixed patches with correct model IDs + Owl Alpha no :free suffix | |
| FROM node:20-alpine AS frontend-builder | |
| RUN apk add --no-cache git python3 | |
| RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /source | |
| # Patch frontend: replace DEFAULT_MODEL_OPTIONS with 13 custom models | |
| COPY patch_frontend.py /tmp/patch_frontend.py | |
| RUN python3 /tmp/patch_frontend.py | |
| WORKDIR /source/frontend | |
| RUN npm install && npm run build | |
| # Stage 2: Production | |
| FROM python:3.12-slim | |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends git curl ca-certificates bash && rm -rf /var/lib/apt/lists/* | |
| RUN git clone --depth 1 https://huggingface.co/spaces/smolagents/ml-intern /tmp/source && \ | |
| cp /tmp/source/pyproject.toml /tmp/source/uv.lock ./ && \ | |
| cp -r /tmp/source/agent ./agent && \ | |
| cp -r /tmp/source/backend ./backend && \ | |
| cp -r /tmp/source/configs ./configs && \ | |
| rm -rf /tmp/source | |
| RUN uv sync --no-dev --frozen | |
| COPY --from=frontend-builder /source/frontend/dist ./static/ | |
| COPY configs/frontend_agent_config.json ./configs/frontend_agent_config.json | |
| # Patch backend: add new model IDs + OpenRouter routing | |
| COPY patch_models.py /tmp/patch_models.py | |
| RUN python /tmp/patch_models.py | |
| RUN mkdir -p /app/session_logs && chown -R user:user /app | |
| USER user | |
| ENV HOME=/home/user \ | |
| PYTHONUNBUFFERED=1 \ | |
| PYTHONPATH=/app \ | |
| PATH="/app/.venv/bin:$PATH" | |
| EXPOSE 7860 | |
| WORKDIR /app/backend | |
| CMD ["bash", "start.sh"] |