# NoahsKI Autonomous Learning System - Dockerfile FROM python:3.11-slim # Set working directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ curl \ git \ && 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 COPY server_enhanced.py . # Create data directories RUN mkdir -p data/knowledge logs # Expose port EXPOSE 5000 # Environment variables ENV PYTHONUNBUFFERED=1 ENV SERVER_HOST=0.0.0.0 ENV SERVER_PORT=5000 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ CMD curl -f http://localhost:5000/health || exit 1 # Run application CMD ["python", "server_enhanced.py"]