Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +37 -40
Dockerfile
CHANGED
|
@@ -1,40 +1,37 @@
|
|
| 1 |
-
FROM python:3.10-slim
|
| 2 |
-
|
| 3 |
-
#
|
| 4 |
-
RUN
|
| 5 |
-
apt-get
|
| 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 |
-
ENV
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
# Start MCP service
|
| 40 |
-
CMD ["python", "mcp_output/start_mcp.py"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
RUN apt-get update && \
|
| 5 |
+
apt-get install -y --no-install-recommends \
|
| 6 |
+
build-essential \
|
| 7 |
+
git \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/* && \
|
| 9 |
+
python -m pip install --upgrade pip
|
| 10 |
+
|
| 11 |
+
WORKDIR /app
|
| 12 |
+
|
| 13 |
+
# Install PyTorch first (CPU version)
|
| 14 |
+
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
|
| 15 |
+
|
| 16 |
+
# Install PyTorch Geometric dependencies with pre-built wheels
|
| 17 |
+
RUN pip install --no-cache-dir torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-2.5.0+cpu.html
|
| 18 |
+
|
| 19 |
+
# Copy and install remaining requirements
|
| 20 |
+
COPY ./mcp_output/requirements.txt /app/requirements.txt
|
| 21 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
+
|
| 23 |
+
# Copy the entire MatDeepLearn project
|
| 24 |
+
COPY . /app
|
| 25 |
+
|
| 26 |
+
# Set Python path to include MatDeepLearn
|
| 27 |
+
ENV PYTHONPATH=/app:$PYTHONPATH
|
| 28 |
+
|
| 29 |
+
# Expose HuggingFace default port
|
| 30 |
+
EXPOSE 7860
|
| 31 |
+
|
| 32 |
+
# Set environment variables for MCP service
|
| 33 |
+
ENV MCP_TRANSPORT=http
|
| 34 |
+
ENV MCP_PORT=7860
|
| 35 |
+
|
| 36 |
+
# Start MCP service
|
| 37 |
+
CMD ["python", "mcp_output/start_mcp.py"]
|
|
|
|
|
|
|
|
|