init v3 branch

This commit is contained in:
2026-09-06 07:48:45 +08:00
parent fd88870d83
commit 98b1069b54
4 changed files with 53 additions and 33 deletions
+1
View File
@@ -6,6 +6,7 @@ app/config.yml
/config.yml
app/data/
data/
tasks/
skills/deps/
skills/*/.deps_installed
skills/*/__pycache__/
+1 -26
View File
@@ -1,31 +1,6 @@
FROM node:20-slim
# MPLBACKEND=Agg:让 matplotlib 使用非交互式后端,避免缺少显示设备报错。
# PYTHONUNBUFFERED=1:实时输出日志。
# TZ=Asia/Shanghai:统一时区。
ENV MPLBACKEND=Agg \
PYTHONUNBUFFERED=1 \
PIP_BREAK_SYSTEM_PACKAGES=1 \
TZ=Asia/Shanghai
# 常用命令行工具:Agent 的 terminal 工具经常用到
RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates curl git python3 python3-pip python3-venv python3-dev \
ripgrep wget jq p7zip-full unzip unar file \
libreoffice-writer libreoffice-calc libreoffice-impress \
fonts-noto-cjk fonts-dejavu fonts-stix \
poppler-utils qpdf ghostscript imagemagick \
tesseract-ocr tesseract-ocr-chi-sim \
ffmpeg sqlite3 libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir --break-system-packages \
requests beautifulsoup4 lxml \
numpy matplotlib \
openpyxl python-docx python-pptx xlrd \
pymupdf pdfplumber pypdf reportlab \
Pillow python-dateutil python-magic \
loguru rich fonttools
ENV TZ=Asia/Shanghai
WORKDIR /app
+23 -7
View File
@@ -1,14 +1,15 @@
services:
agent:
agent-core:
build: ./app
container_name: agent
container_name: agent-core
restart: unless-stopped
expose:
- "8080" # 仅内网暴露,由 nginx-proxy 对外
volumes:
- ./data:/workspace/tasks # 持久化:任务目录 + SQLite(.agent.db 在此目录内)
- ./tasks:/workspace/tasks # 持久化:任务目录
- ./skills:/workspace/skills # 技能目录:所有任务/会话共享同一份技能
- ./config.yml:/app/config.yml # 2.0:去掉 :ro,允许设置页写配置(写前服务端会校验)
- ./data:/workspace/data # 持久化:数据目录
- ./config.yml:/app/config.yml # 允许设置页写配置(写前服务端会校验)
- ./app/server:/app/server
environment:
- PORT=8080
@@ -16,9 +17,24 @@ services:
- VIRTUAL_HOST=agent.ai.foresh.com
- VIRTUAL_PORT=8080
- CERT_NAME=default
# 加入executor独立服务
- EXECUTOR_URL=http://agent-executor:9000
networks:
- my-app-network
networks:
my-app-network:
external: true
agent-executor:
build: ./executor
container_name: agent-executor
restart: unless-stopped
expose:
- "9000"
volumes:
- ./tasks:/workspace/tasks # 持久化:任务目录
- ./skills:/workspace/skills # 技能目录:所有任务/会话共享同一份技能
environment:
- PORT=9000
cap_drop:
- SYS_ADMIN
- DAC_OVERRIDE
networks:
- my-app-network
+28
View File
@@ -0,0 +1,28 @@
FROM node:20-slim
# MPLBACKEND=Agg:让 matplotlib 使用非交互式后端,避免缺少显示设备报错。
# PYTHONUNBUFFERED=1:实时输出日志。
# TZ=Asia/Shanghai:统一时区。
ENV MPLBACKEND=Agg \
PYTHONUNBUFFERED=1 \
PIP_BREAK_SYSTEM_PACKAGES=1 \
TZ=Asia/Shanghai
# 常用命令行工具:Agent 的 terminal 工具经常用到
RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates curl git python3 python3-pip python3-venv python3-dev \
ripgrep wget jq p7zip-full unzip unar file \
libreoffice-writer libreoffice-calc libreoffice-impress \
fonts-noto-cjk fonts-dejavu fonts-stix \
poppler-utils qpdf ghostscript imagemagick \
tesseract-ocr tesseract-ocr-chi-sim \
ffmpeg sqlite3 libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir --break-system-packages \
requests beautifulsoup4 lxml \
numpy matplotlib \
openpyxl python-docx python-pptx xlrd \
pymupdf pdfplumber pypdf reportlab \
Pillow python-dateutil python-magic \
loguru rich fonttools