Files
The-Ouroboros/Dockerfile
Jiho Son d1750af80f
Some checks failed
CI / test (push) Has been cancelled
Add complete Ouroboros trading system with TDD test suite
Implement the full autonomous trading agent architecture:
- KIS broker with async API, token refresh, leaky bucket rate limiter, and hash key signing
- Gemini-powered decision engine with JSON parsing and confidence threshold enforcement
- Risk manager with circuit breaker (-3% P&L) and fat finger protection (30% cap)
- Evolution engine for self-improving strategy generation via failure analysis
- 35 passing tests written TDD-first covering risk, broker, and brain modules
- CI/CD pipeline, Docker multi-stage build, and AI agent context docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:08:48 +09:00

45 lines
816 B
Docker

FROM python:3.11-slim AS base
WORKDIR /app
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY pyproject.toml .
RUN pip install --no-cache-dir ".[dev]"
# Copy source
COPY src/ src/
COPY tests/ tests/
COPY docs/ docs/
# Create data directory
RUN mkdir -p data
# Run tests as build validation
RUN pytest -v --tb=short
# Production stage
FROM python:3.11-slim AS production
WORKDIR /app
COPY pyproject.toml .
RUN pip install --no-cache-dir .
COPY src/ src/
RUN mkdir -p data
# Non-root user
RUN useradd --create-home appuser
USER appuser
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD python -c "import sys; sys.exit(0)"
ENTRYPOINT ["python", "-m", "src.main"]
CMD ["--mode=paper"]