File size: 1,748 Bytes
02f4a63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Docker Compose for OpenRA-RL development
#
# Usage:
#   Game server only:  docker compose up openra-rl
#   With LLM agent:    docker compose up agent
#   With MCP bot:      docker compose run mcp-bot
#
# Build:
#   docker compose build

services:
  openra-rl:
    image: ${OPENRA_RL_IMAGE:-ghcr.io/yxc20089/openra-rl:latest}
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8000:8000"   # OpenEnv HTTP API
      - "9999:9999"   # gRPC bridge (direct access)
    environment:
      - OPENRA_PATH=/opt/openra
      - DISPLAY=:99
      - LIBGL_ALWAYS_SOFTWARE=1
      - MESA_GL_VERSION_OVERRIDE=3.3
    deploy:
      resources:
        limits:
          cpus: "4"
          memory: 4G
    shm_size: 256m
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
      interval: 30s
      timeout: 5s
      start_period: 60s
      retries: 3

  agent:
    build:
      context: .
      dockerfile: Dockerfile.agent
    environment:
      - OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
      - OPENROUTER_MODEL=${OPENROUTER_MODEL:-anthropic/claude-sonnet-4-20250514}
      - OPENRA_URL=http://openra-rl:8000
    command: >
      python examples/llm_agent.py
      --url http://openra-rl:8000
      --max-turns ${MAX_TURNS:-200}
      --verbose
    depends_on:
      openra-rl:
        condition: service_healthy

  mcp-bot:
    build:
      context: .
      dockerfile: Dockerfile.agent
    environment:
      - OPENRA_URL=http://openra-rl:8000
    command: >
      python examples/mcp_bot.py
      --url http://openra-rl:8000
      --max-turns ${MAX_TURNS:-3000}
      --verbose
    depends_on:
      openra-rl:
        condition: service_healthy
    profiles:
      - bot