28 lines
721 B
Docker
28 lines
721 B
Docker
# ============================================================
|
||
# 慧遇 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"]
|