Spaces:
Running
Running
fixes
Browse files- Dockerfile +3 -1
- demo/health.py +5 -4
Dockerfile
CHANGED
|
@@ -19,8 +19,10 @@ RUN apt-get update && \
|
|
| 19 |
rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
COPY demo/requirements.txt demo/requirements.txt
|
|
|
|
| 22 |
RUN pip install --upgrade pip && \
|
| 23 |
-
pip install --pre -r demo/requirements.txt
|
|
|
|
| 24 |
|
| 25 |
COPY demo demo
|
| 26 |
|
|
|
|
| 19 |
rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
COPY demo/requirements.txt demo/requirements.txt
|
| 22 |
+
COPY mcp mcp
|
| 23 |
RUN pip install --upgrade pip && \
|
| 24 |
+
pip install --pre -r demo/requirements.txt && \
|
| 25 |
+
pip install -e ./mcp
|
| 26 |
|
| 27 |
COPY demo demo
|
| 28 |
|
demo/health.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
| 3 |
import html
|
| 4 |
-
import importlib.util
|
| 5 |
import re
|
| 6 |
import os
|
| 7 |
import shutil
|
|
@@ -10,6 +9,7 @@ import asyncio
|
|
| 10 |
import sys
|
| 11 |
from pathlib import Path
|
| 12 |
import logging
|
|
|
|
| 13 |
from dataclasses import dataclass
|
| 14 |
from itertools import zip_longest
|
| 15 |
from typing import Iterable
|
|
@@ -120,18 +120,19 @@ def _check_mcp_health() -> ToolStatus:
|
|
| 120 |
env = os.environ.copy()
|
| 121 |
env["PYTHONPATH"] = py_path
|
| 122 |
|
| 123 |
-
|
|
|
|
| 124 |
logging.warning(
|
| 125 |
"MCP probe spawning server: cmd=%s args=%s PYTHONPATH=%s cwd=%s",
|
| 126 |
sys.executable,
|
| 127 |
-
|
| 128 |
py_path,
|
| 129 |
repo_root,
|
| 130 |
)
|
| 131 |
|
| 132 |
transport = StdioTransport(
|
| 133 |
command=sys.executable,
|
| 134 |
-
args=
|
| 135 |
env=env,
|
| 136 |
cwd=str(repo_root),
|
| 137 |
)
|
|
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
| 3 |
import html
|
|
|
|
| 4 |
import re
|
| 5 |
import os
|
| 6 |
import shutil
|
|
|
|
| 9 |
import sys
|
| 10 |
from pathlib import Path
|
| 11 |
import logging
|
| 12 |
+
import importlib.util
|
| 13 |
from dataclasses import dataclass
|
| 14 |
from itertools import zip_longest
|
| 15 |
from typing import Iterable
|
|
|
|
| 120 |
env = os.environ.copy()
|
| 121 |
env["PYTHONPATH"] = py_path
|
| 122 |
|
| 123 |
+
server_entry = ["-m", "aileen3_mcp.server"]
|
| 124 |
+
|
| 125 |
logging.warning(
|
| 126 |
"MCP probe spawning server: cmd=%s args=%s PYTHONPATH=%s cwd=%s",
|
| 127 |
sys.executable,
|
| 128 |
+
server_entry,
|
| 129 |
py_path,
|
| 130 |
repo_root,
|
| 131 |
)
|
| 132 |
|
| 133 |
transport = StdioTransport(
|
| 134 |
command=sys.executable,
|
| 135 |
+
args=server_entry,
|
| 136 |
env=env,
|
| 137 |
cwd=str(repo_root),
|
| 138 |
)
|