FROM alpine WORKDIR /app # Install dependencies RUN apk add --no-cache python3 py3-pip git py3-uv nodejs npm # Clone One-MCP first RUN git clone https://github.com/One-MCP/multi-mcp.git . RUN uv venv && . .venv/bin/activate && uv pip install -r requirements.txt # Create writable directory for mcp-remote auth configs AFTER git clone RUN mkdir -p /app/.mcp-auth && chmod 777 /app/.mcp-auth # Copy requirements and create venvs COPY tools/requirements/ /tmp/requirements/ RUN python3 -m venv /app/venvs/shared RUN /app/venvs/shared/bin/pip install -r /tmp/requirements/shared.txt RUN for req in /tmp/requirements/*.txt; do \ name=$(basename "$req" .txt); \ if [ "$name" != "shared" ]; then \ python3 -m venv "/app/venvs/$name"; \ "/app/venvs/$name/bin/pip" install -r "$req"; \ fi; \ done # Copy tools and config COPY tools/ /app/tools/ COPY mcp.json /app/mcp.json # Cache directories RUN mkdir /app/.uv-cache && chmod -R 777 /app/.uv-cache ENV UV_CACHE_DIR=/app/.uv-cache RUN mkdir /app/.npm-cache && chmod -R 777 /app/.npm-cache ENV npm_config_cache=/app/.npm-cache # Set home directory for mcp-remote configs ENV HOME=/app ENV MCP_CONFIG_DIR=/app/.mcp-auth # One-MCP settings ENV CONFIG=/app/mcp.json ENV TRANSPORT=sse ENV USE_NAMESPACE=True EXPOSE 7860 CMD ["/app/.venv/bin/hypercorn", "src.main:app", "--bind", "0.0.0.0:7860"]