Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
EXPOSE 7860
|
| 51 |
|
| 52 |
-
CMD ["
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|