2026-01-31 11:12:32 +08:00
|
|
|
|
# TH Agenter 基础镜像 - 包含所有依赖
|
|
|
|
|
|
# 使用方法:
|
|
|
|
|
|
# 1. 构建基础镜像:docker build -f Dockerfile.base -t registry.t-aaron.com/hyf-backend-base:latest .
|
|
|
|
|
|
# 2. 推送到仓库:docker push registry.t-aaron.com/hyf-backend-base:latest
|
|
|
|
|
|
# 3. 之后使用 Dockerfile.new 进行快速部署
|
|
|
|
|
|
|
|
|
|
|
|
FROM registry.t-aaron.com/python:3.11-slim
|
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
2026-01-31 14:31:29 +08:00
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
|
build-essential \
|
|
|
|
|
|
libpq-dev \
|
2026-01-31 11:12:32 +08:00
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
2026-01-31 14:31:29 +08:00
|
|
|
|
# 复制依赖文件(排除 Windows 专用包 win32_setctime)
|
2026-01-31 11:12:32 +08:00
|
|
|
|
COPY requirements.txt .
|
2026-01-31 14:31:29 +08:00
|
|
|
|
RUN grep -v '^win32_setctime' requirements.txt > /tmp/requirements.txt \
|
2026-01-31 11:12:32 +08:00
|
|
|
|
&& pip install --no-cache-dir -r /tmp/requirements.txt \
|
2026-01-31 14:31:29 +08:00
|
|
|
|
&& pip install --no-cache-dir fastapi-cdn-host langchain-tavily langgraph-checkpoint-postgres
|