Spaces:
Running
Running
| # Eodi MCP Server - Streamable HTTP Transport | |
| # MCP Protocol 2025-03-26 ์ง์ + bge-m3 ๋ค๊ตญ์ด ์๋ฒ ๋ฉ | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # ์์คํ ์์กด์ฑ | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Python ์์กด์ฑ (Poetry ์์ด ์ง์ ์ค์น - ๋ ์์ ์ ) | |
| # 1. PyTorch CPU ๋ฒ์ ๋จผ์ ์ค์น | |
| RUN pip install --no-cache-dir \ | |
| torch --index-url https://download.pytorch.org/whl/cpu | |
| # 2. ๋๋จธ์ง ์์กด์ฑ ์ค์น (์ผ๋ฐ PyPI) | |
| RUN pip install --no-cache-dir \ | |
| fastapi \ | |
| "uvicorn[standard]" \ | |
| starlette \ | |
| python-dotenv \ | |
| httpx \ | |
| supabase \ | |
| google-generativeai \ | |
| mcp \ | |
| sentence-transformers \ | |
| pydantic \ | |
| python-frontmatter \ | |
| pyyaml \ | |
| click \ | |
| aiohttp \ | |
| PyJWT | |
| # ์ ํ๋ฆฌ์ผ์ด์ ์ฝ๋ ๋ณต์ฌ | |
| COPY . . | |
| # ํฌํธ ๋ ธ์ถ | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| # Streamable HTTP Transport ์๋ฒ ์คํ | |
| CMD ["uvicorn", "src.mcp.server_streamable:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips", "*"] | |