eu-ai-act-chatgpt-mcp / Dockerfile
drosatos's picture
Deploy ChatGPT MCP Server
9434d3d
# EU AI Act - ChatGPT MCP Server
# Standalone MCP server for ChatGPT Apps integration
# Deploys ONLY the MCP tools (discover_organization, discover_ai_services, assess_compliance)
FROM node:20-slim
# Install Python, pnpm, and uv
RUN apt-get update && apt-get install -y \
python3 \
python3-venv \
curl \
&& npm install -g pnpm \
&& curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/usr/local/bin sh \
&& rm -rf /var/lib/apt/lists/*
# Use existing node user (UID 1000) for HF Spaces compatibility
USER node
ENV HOME=/home/node
WORKDIR $HOME/app
# Copy entire monorepo
COPY --chown=node . .
# Install Node dependencies
RUN pnpm install --frozen-lockfile
# Build MCP server and Agent (needed for API)
RUN pnpm --filter @eu-ai-act/mcp-server build
RUN pnpm --filter @eu-ai-act/agent build
# Create Python venv and install dependencies
RUN uv venv $HOME/venv && \
. $HOME/venv/bin/activate && \
uv pip install --no-cache -r apps/eu-ai-act-agent/requirements.txt
# Environment
ENV NODE_ENV=production \
PORT=3001 \
API_URL=http://localhost:3001 \
PUBLIC_URL=https://mcp-1st-birthday-eu-ai-act-chatgpt-mcp.hf.space \
CHATGPT_APP_SERVER_NAME=0.0.0.0 \
CHATGPT_APP_SERVER_PORT=7860 \
PATH=/home/node/venv/bin:$PATH \
VIRTUAL_ENV=/home/node/venv \
MCP_SERVER_PATH=/home/node/app/packages/eu-ai-act-mcp/dist/index.js
WORKDIR $HOME/app/apps/eu-ai-act-agent
EXPOSE 7860
# Start API server + ChatGPT MCP App on port 7860
# MCP URL will be: PUBLIC_URL/gradio_api/mcp/
CMD node dist/server.js & \
sleep 2 && \
python src/chatgpt_app.py