FROM python:3.10-slim # Install system dependencies RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ git \ wget \ && rm -rf /var/lib/apt/lists/* && \ python -m pip install --upgrade pip WORKDIR /app # Install specific PyTorch version (CPU) RUN pip install --no-cache-dir torch==2.4.0 --index-url https://download.pytorch.org/whl/cpu # Install PyTorch Geometric and extensions matching torch 2.4.0 CPU RUN pip install --no-cache-dir \ torch-scatter \ torch-sparse \ torch-cluster \ torch-spline-conv \ -f https://data.pyg.org/whl/torch-2.4.0+cpu.html RUN pip install --no-cache-dir torch-geometric # Copy and install remaining requirements COPY ./mcp_output/requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy the entire MatDeepLearn project COPY . /app # Set Python path to include MatDeepLearn ENV PYTHONPATH=/app:$PYTHONPATH # Expose HuggingFace default port EXPOSE 7860 # Set environment variables for MCP service ENV MCP_TRANSPORT=http ENV MCP_PORT=7860 # Start MCP service CMD ["python", "mcp_output/start_mcp.py"]