- search_agent: 支持 MODEL_NAME 环境变量配置模型名称 - a2a_litellm_agent: 支持 MODEL_NAME 或 LITELLM_MODEL 环境变量 - mysql_agent/postgresql_agent: 新增数据库查询 agent - echo_agent: 新增回显测试 agent - jina_search_agent: 新增 Jina 搜索 agent - 更新 callback_utils 默认回调 URL - 优化 k8s_manager 模板端口和镜像映射 - 清理冗余文件和备份文件
45 lines
1.1 KiB
Docker
45 lines
1.1 KiB
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# 安装系统依赖
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
libpq-dev \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 安装 Python 依赖
|
|
RUN pip install --no-cache-dir \
|
|
fastapi==0.109.0 \
|
|
uvicorn[standard]==0.27.0 \
|
|
pydantic==2.5.3 \
|
|
requests>=2.31.0 \
|
|
langchain>=0.1.0 \
|
|
langchain-community>=0.0.10 \
|
|
langchain-openai>=0.0.2 \
|
|
psycopg2-binary>=2.9.9
|
|
|
|
# 复制 common 模块(回调工具)
|
|
COPY common/agent_callback_utils.py /app/common/
|
|
RUN touch /app/common/__init__.py
|
|
|
|
# 复制应用代码
|
|
COPY agents/postgresql_agent/postgresql_agent.py /app/
|
|
|
|
# 环境变量
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV SERVICE_HOST=0.0.0.0
|
|
ENV SERVICE_PORT=8000
|
|
|
|
# 回调配置
|
|
ENV AGENT_CALLBACK_URL=http://mcp-server:8002/api/v1/billing/agent-callback
|
|
|
|
# 健康检查
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
|
|
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()" || exit 1
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["python3", "-u", "postgresql_agent.py"]
|