Files
zhaoxi d84212f780 chore: initial commit for Pretor v0.1.0-alpha
正式发布 Pretor 平台的首个 alpha 版本。本项目旨在构建一个基于分布式架构的多智能体协同工作流水线。

核心功能实现:
1. 建立基于 BaseIndividual 的动态插件加载机制。
2. 实现三类核心 worker_individual 子个体。
3. 集成 Ray 框架支持分布式集群调度。
4. 基于 PostgreSQL 的全量持久化存储方案。
5. 提供完整的 FastAPI 后端与 React 前端交互界面。
2026-04-29 10:09:07 +08:00

42 lines
1.1 KiB
Docker

# Stage 1: Build the React frontend
FROM node:22-alpine AS frontend-builder
WORKDIR /app/frontend
# Install dependencies and build the static assets
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# Stage 2: Build the Python backend and serve
FROM python:3.13-slim
WORKDIR /app
# Install system dependencies (for building PostgreSQL drivers and other native extensions)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Install uv package manager
RUN pip install uv
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Install python dependencies without the current package (speeds up layer caching)
RUN uv sync --frozen --no-install-project --no-dev
# Copy the rest of the application
COPY . .
# Copy the built frontend static assets from Stage 1
COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist
# Expose FastAPI and Ray Dashboard ports
EXPOSE 8000 8265
# Start the application
CMD ["uv", "run", "python", "main.py"]