增加docker部署文件
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user