118 líneas
2.8 KiB
YAML
118 líneas
2.8 KiB
YAML
# CUDA Quantum MCP Server - Docker Compose Configuration
|
|
# Production-ready deployment with GPU support and monitoring
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# Main MCP server
|
|
mcp-quantum:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: mcp-quantum:latest
|
|
container_name: cuda-quantum-mcp
|
|
restart: unless-stopped
|
|
|
|
# Environment configuration
|
|
environment:
|
|
- NODE_ENV=production
|
|
- CUDAQ_DEFAULT_TARGET=qpp-gpu
|
|
- LOG_LEVEL=info
|
|
- CUDA_VISIBLE_DEVICES=0
|
|
- NVIDIA_VISIBLE_DEVICES=all
|
|
- MCP_SERVER_NAME=cuda-quantum-mcp-prod
|
|
|
|
# GPU support (requires nvidia-docker)
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
|
|
# Volume mounts
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./config:/app/config:ro
|
|
- quantum-data:/app/data
|
|
|
|
# Network configuration
|
|
networks:
|
|
- quantum-net
|
|
|
|
# Health check
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "console.log('Health OK')"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Optional: Monitoring with Prometheus
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: quantum-prometheus
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus-data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
|
- '--web.console.templates=/etc/prometheus/consoles'
|
|
- '--web.enable-lifecycle'
|
|
networks:
|
|
- quantum-net
|
|
|
|
# Optional: Grafana dashboard
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: quantum-grafana
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3001:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=quantum123
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
volumes:
|
|
- grafana-data:/var/lib/grafana
|
|
- ./monitoring/grafana:/etc/grafana/provisioning:ro
|
|
networks:
|
|
- quantum-net
|
|
|
|
# Optional: Log aggregation
|
|
fluentd:
|
|
build: ./monitoring/fluentd
|
|
container_name: quantum-fluentd
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./logs:/fluentd/log/mcp
|
|
- ./monitoring/fluentd/conf:/fluentd/etc:ro
|
|
ports:
|
|
- "24224:24224"
|
|
networks:
|
|
- quantum-net
|
|
|
|
# Networks
|
|
networks:
|
|
quantum-net:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.20.0.0/16
|
|
|
|
# Volumes
|
|
volumes:
|
|
quantum-data:
|
|
driver: local
|
|
prometheus-data:
|
|
driver: local
|
|
grafana-data:
|
|
driver: local
|
|
|
|
# Development override available in docker-compose.dev.yml
|
|
# To use development mode: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up |