Spaces:
Sleeping
Sleeping
File size: 1,170 Bytes
b2070f4 8a7b3fc b2070f4 8a7b3fc b2070f4 8a7b3fc b2070f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 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"]
|