Spaces:
Sleeping
Sleeping
update dockerfile
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
|
@@ -1,20 +1,21 @@
|
|
| 1 |
-
# Use Python 3.11 slim image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
| 10 |
build-essential \
|
|
|
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Copy
|
| 14 |
-
COPY
|
| 15 |
|
| 16 |
# Copy MCP service requirements
|
| 17 |
-
COPY
|
| 18 |
|
| 19 |
# Install Python dependencies with explicit version check
|
| 20 |
RUN pip install --no-cache-dir -r /app/requirements.txt && \
|
|
@@ -25,10 +26,10 @@ RUN pip install --no-cache-dir -r /app/requirements.txt && \
|
|
| 25 |
# DO NOT reinstall them separately as it may upgrade fastmcp to a newer version
|
| 26 |
|
| 27 |
# Create output directories with write permissions
|
| 28 |
-
RUN mkdir -p /app/
|
| 29 |
-
/app/
|
| 30 |
-
&& chmod -R 777 /app/
|
| 31 |
-
&& chmod -R 777 /app/
|
| 32 |
|
| 33 |
# Set environment variables
|
| 34 |
ENV PYTHONUNBUFFERED=1
|
|
@@ -41,4 +42,4 @@ ENV MCP_PORT=7860
|
|
| 41 |
EXPOSE 7860
|
| 42 |
|
| 43 |
# Start MCP service in HTTP mode
|
| 44 |
-
CMD ["python", "/app/
|
|
|
|
| 1 |
+
# Use Python 3.11 slim image with CUDA support for better performance
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system dependencies required for physics simulation and deep learning
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
| 10 |
build-essential \
|
| 11 |
+
wget \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Copy physics_mcp folder
|
| 15 |
+
COPY physics_mcp /app/physics_mcp
|
| 16 |
|
| 17 |
# Copy MCP service requirements
|
| 18 |
+
COPY physics_mcp/mcp_output/requirements.txt /app/requirements.txt
|
| 19 |
|
| 20 |
# Install Python dependencies with explicit version check
|
| 21 |
RUN pip install --no-cache-dir -r /app/requirements.txt && \
|
|
|
|
| 26 |
# DO NOT reinstall them separately as it may upgrade fastmcp to a newer version
|
| 27 |
|
| 28 |
# Create output directories with write permissions
|
| 29 |
+
RUN mkdir -p /app/physics_mcp/mcp_output/mcp_logs \
|
| 30 |
+
/app/physics_mcp/mcp_output/output \
|
| 31 |
+
&& chmod -R 777 /app/physics_mcp/mcp_output/mcp_logs \
|
| 32 |
+
&& chmod -R 777 /app/physics_mcp/mcp_output/output
|
| 33 |
|
| 34 |
# Set environment variables
|
| 35 |
ENV PYTHONUNBUFFERED=1
|
|
|
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
# Start MCP service in HTTP mode
|
| 45 |
+
CMD ["python", "/app/physics_mcp/mcp_output/start_mcp.py"]
|