SEUyishu commited on
Commit
adc673d
·
verified ·
1 Parent(s): 1317c90

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -5
Dockerfile CHANGED
@@ -42,11 +42,20 @@ RUN set -ex \
42
 
43
  # Install MCP service dependencies
44
  RUN if [ -f "mcp_output/requirements.txt" ]; then \
45
- pip install --no-cache-dir -r mcp_output/requirements.txt; \
46
- fi
47
-
48
- WORKDIR /app/mcp_output
49
 
50
  EXPOSE 7860
51
 
52
- CMD ["python", "start_mcp.py", "--mode", "sse", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
42
 
43
  # Install MCP service dependencies
44
  RUN if [ -f "mcp_output/requirements.txt" ]; then \
45
+ pip install --no-cache-dir -r mcp_output/requirements.txt; \
46
+ elif [ -f "requirements.txt" ]; then \
47
+ pip install --no-cache-dir -r requirements.txt; \
48
+ fi
49
 
50
  EXPOSE 7860
51
 
52
+ CMD ["/bin/sh", "-c", "\
53
+ ENTRY=\$(find /app -maxdepth 3 -name start_mcp.py | head -n 1); \
54
+ if [ -n \"$ENTRY\" ]; then \
55
+ echo 'Launching MCP service using' $ENTRY; \
56
+ python $ENTRY --mode sse --host 0.0.0.0 --port 7860; \
57
+ else \
58
+ echo 'start_mcp.py not found. Directory tree:'; \
59
+ find /app -maxdepth 3 -type f; \
60
+ exit 1; \
61
+ fi"]