增加docker部署文件

This commit is contained in:
2026-06-10 20:18:24 +08:00
parent 82c0005d6c
commit 39a1aa4c27

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
# ============================================================
# 慧遇 ADK Agent API 服务 Dockerfile
# ============================================================
FROM python:3.14-slim
WORKDIR /app
# 安装系统依赖(部分 Python 包需要编译)
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件并安装
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制项目代码
COPY . .
# 暴露端口
EXPOSE 8003
# 启动命令:使用 adk api_server自动创建 session监听 8003
CMD ["adk", "api_server", ".", "--auto_create_session", "--port", "8003"]