Dockerfile.fast•1.48 kB
# Ultra-fast Dockerfile for Smithery deployment
# Uses deployment-specific dependencies to avoid timeouts
FROM python:3.11-slim
WORKDIR /app
# Copy essential files
COPY src/ ./src/
# Copy deployment-specific pyproject.toml (without heavy dependencies)
COPY pyproject.deployment.toml ./pyproject.toml
# Install lightweight dependencies first
RUN pip install --no-cache-dir \
mcp \
aiohttp \
websockets \
pydantic \
typer \
rich \
loguru
# Install scientific packages with timeout and fallback
RUN pip install --no-cache-dir --timeout 300 \
numpy \
matplotlib
# Try to install scipy and qutip with prebuilt wheels only
RUN pip install --no-cache-dir --only-binary=all \
scipy || echo "Scipy wheel not available, skipping"
RUN pip install --no-cache-dir --only-binary=all \
qutip || echo "QuTiP wheel not available, skipping"
# Install the application without dependencies
RUN pip install --no-cache-dir -e . --no-deps
# Copy and setup configuration
COPY config/ ./config/
RUN mkdir -p /root/.config/psianimator-mcp
COPY config/default_config.json /root/.config/psianimator-mcp/config.json
# Environment
ENV PYTHONPATH=/app/src \
PSIANIMATOR_CONFIG=/root/.config/psianimator-mcp/config.json \
PYTHONUNBUFFERED=1
EXPOSE 3000
# Simple health check
HEALTHCHECK --interval=30s --timeout=5s --retries=2 \
CMD python -c "import psianimator_mcp" || exit 1
# Run server
CMD ["python", "-m", "psianimator_mcp.cli", "serve"]