Spaces:
Paused
Paused
| FROM nvidia/cuda:12.8.0-runtime-ubuntu22.04 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl ca-certificates git libgomp1 libssl3 nginx openssl python3 \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && chown -R 1000:1000 /var/lib/nginx /var/log/nginx /run | |
| # Node.js 20 (for JS-based MCP servers + supergateway bridge) | |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
| && apt-get install -y --no-install-recommends nodejs \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH="/home/user/.local/bin:/app/bin:$PATH" | |
| # uv + arxiv-mcp-server (Python, stdio — bridged to HTTP via supergateway) | |
| RUN curl -fsSL https://astral.sh/uv/install.sh | sh \ | |
| && /home/user/.local/bin/uv tool install 'arxiv-mcp-server[pdf]' | |
| # Brave Search MCP (native HTTP) + supergateway (stdio→SSE bridge) | |
| RUN npm config set prefix /home/user/.local \ | |
| && npm install -g @brave/brave-search-mcp-server supergateway | |
| WORKDIR /app | |
| COPY --chown=user bin/ /app/bin/ | |
| ENV LD_LIBRARY_PATH=/app/bin | |
| COPY --chown=user entrypoint.sh /app/entrypoint.sh | |
| COPY --chown=user nginx.conf /app/nginx.conf | |
| COPY --chown=user dashboard.html /app/dashboard.html | |
| COPY --chown=user metrics_pusher.py /app/metrics_pusher.py | |
| RUN chmod +x /app/entrypoint.sh | |
| EXPOSE 7860 | |
| CMD ["/app/entrypoint.sh"] | |