tori/Dockerfile
Fam Zheng ee4a5dfc95 App-templates: LLM auto-selects project template based on user requirement
- Add webapp template (FastAPI + SQLite) with INSTRUCTIONS.md and setup.sh
- select_template() scans templates, asks LLM to match; apply_template() copies to workspace
- ensure_workspace() runs setup.sh if present, otherwise falls back to default venv
- INSTRUCTIONS.md injected into planning and execution prompts
- Fix pre-existing clippy warning in kb.rs (filter_map → map)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 21:33:40 +00:00

26 lines
978 B
Docker

# Stage 1: Build frontend
FROM node:22-alpine AS frontend
WORKDIR /app/web
COPY web/package.json web/package-lock.json ./
RUN npm ci
COPY web/ ./
RUN npm run build
# Stage 2: Runtime (debian for glibc — torch/sentence-transformers need manylinux wheels)
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
RUN uv venv --python 3.12 /app/venv && uv pip install --python /app/venv/bin/python sentence-transformers
RUN /app/venv/bin/python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
RUN mkdir -p /app/data/workspaces
WORKDIR /app
COPY target/aarch64-unknown-linux-musl/release/tori .
COPY --from=frontend /app/web/dist ./web/dist/
COPY scripts/embed.py ./scripts/
COPY app-templates/ ./templates/
COPY config.yaml .
EXPOSE 3000
CMD ["./tori"]