mirror of
https://github.com/hanzoai/agent.git
synced 2026-09-11 21:08:51 +00:00
Consolidate all Hanzo agent infrastructure into one repo: - control-plane/: Go control plane server (was agents-new) - sdk/: Go, Python, TypeScript SDKs - deployments/: Docker, Kubernetes, Helm configs - Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest) - CI builds both SDK + control-plane images No more agentfield — everything is hanzoai/agent.
52 lines
1.3 KiB
Docker
52 lines
1.3 KiB
Docker
# Multi-stage Dockerfile for Hanzo Agent SDK
|
|
# This Dockerfile creates a production-ready image for the Hanzo AI SDK
|
|
|
|
# Build stage
|
|
FROM python:3.12-slim AS builder
|
|
|
|
# Install uv for fast Python package management
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy dependency files and README (required by hatchling build backend)
|
|
COPY pyproject.toml uv.lock README.md ./
|
|
|
|
# Install dependencies
|
|
RUN uv sync --frozen --no-dev
|
|
|
|
# Production stage
|
|
FROM python:3.12-slim
|
|
|
|
# Install runtime dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create non-root user
|
|
RUN groupadd -r hanzo && useradd -r -g hanzo hanzo
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy virtual environment from builder
|
|
COPY --from=builder /app/.venv /app/.venv
|
|
|
|
# Copy application code
|
|
COPY --chown=hanzo:hanzo . .
|
|
|
|
# Set environment variables
|
|
ENV PATH="/app/.venv/bin:${PATH}"
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
# Switch to non-root user
|
|
USER hanzo
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD python -c "import agents; print('OK')" || exit 1
|
|
|
|
# Default command (can be overridden)
|
|
CMD ["python", "-m", "agents"] |