FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ gcc \ g++ \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install Python dependencies COPY server_requirements.txt . RUN pip install --no-cache-dir -r server_requirements.txt # Copy application code COPY server/ ./server/ COPY core/ ./core/ COPY prompts/ ./prompts/ COPY run_server.py ./ # Create data directories RUN mkdir -p server/data/uploads server/data/outputs # Set Python path ENV PYTHONPATH=/app:/app/server # Expose port EXPOSE 8000 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD curl -f http://localhost:8000/health || exit 1 # Run with the startup script CMD ["python", "run_server.py"]