FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements-n8n.txt .
RUN pip install --no-cache-dir -r requirements-n8n.txt
# Install additional dependencies for the MCP server
RUN pip install --no-cache-dir \
torch \
transformers \
accelerate \
bitsandbytes \
scipy \
pydantic \
python-dotenv
# Copy application files
COPY . .
# Make sure Python can find the modules
ENV PYTHONPATH=/app
# Expose port
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Run the bridge
CMD ["python", "mcp_http_bridge.py", "--host", "0.0.0.0", "--port", "8080"]