Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions examples/multi-agent-coordinator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Multi-Agent Coordination System Dockerfile

FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
git \
curl \
&& rm -rf /var/lib/apt/lists/*

# Copy requirements first for better caching
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . .

# Create necessary directories
RUN mkdir -p /app/data /app/logs

# Set environment variables
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1

# Expose port
EXPOSE 8000

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import asyncio; from main import MultiAgentCoordinator; \
async def check(): \
coordinator = MultiAgentCoordinator(); \
await coordinator.initialize(); \
health = await coordinator.monitoring_system.health_check(); \
await coordinator.shutdown(); \
exit(0 if health['status'] == 'healthy' else 1); \
asyncio.run(check())" || exit 1

# Default command
CMD ["python", "main.py"]

Loading