Skip to content

The first exam for code agents in the physical world: frozen robot tasks from many benchmark suites, each answered with a program and verified in a separate sandbox. Runs on Harbor.

5.3 KB
Raw Blame
# The match service of Embodied Olympics' tabletennis_g1 (revision g1tt-10+core-0.5) inside the task. Four containers
# share the egress sidecar's network namespace (keep [agent] network_mode = "allowlist"): main (the agent: the seat
# image with the G1 toolkit, the training kit and the practice sandbox; no GPU) reaches the match service
# (`sim`, core/launch.py, eai-standard-lockstep/1.0, core/lockstep.py) at localhost:8000 and the practice service (`practice`, full copies
# of the match world: no opponent or the practice player, never the official one) at localhost:8100; the practice player
# (`practice_player`) answers the practice service at localhost:8200. The seat is unmetered: no metering proxy and no
# credential in the sim (Harbor records the model's usage). The opponent (the platform's G1 at level 4) plays in
# the sim on CPU. cap_drop NET_RAW: no raw sockets and no SO_MARK, which could bypass the egress proxy's mark.
services:
  main:
    pids_limit: 2048   # rcb-monitor
    volumes:   # rcb-monitor
      - rcb_limits:/run/rcb-limits:ro   # rcb-monitor
    depends_on: [sim, practice]
    cap_drop: [NET_RAW]
    shm_size: 2g
  sim:
    cpus: 12   # rcb-monitor
    mem_limit: 8192m   # rcb-monitor
    pids_limit: 1024   # rcb-monitor
    build:   # environment/sim/Dockerfile: the base image, sim/ at /srv
      context: sim
      dockerfile: Dockerfile
    volumes:
      - rcb_observe:/run/rcb-observe:ro   # rcb-monitor
      - devworld_gate_trusted:/devgate
    working_dir: /srv
    command: ["python3", "-m", "core.lockstep"]   # Embodied First Exam: the world in lockstep
    cap_drop: [NET_RAW]
    environment:
      RCB_DATA: "/data"
      MUJOCO_GL: "osmesa"
      PYOPENGL_PLATFORM: "osmesa"
      OPENBLAS_NUM_THREADS: "1"
      OMP_NUM_THREADS: "1"
      RO_PLUGIN: "/srv/sport/plugin.py"
      RO_SPORT: "tabletennis_g1"
      RO_FORMAT: "match"
      RO_SEATS: "A"
      RO_SEED: "4"
      RO_SEED_SALT: ""
      RO_SEED_INDEX: ""
      RO_FIRST: "A"
      RO_LEVEL: "4"
      RO_SLOWDOWN: "1"
      RO_RENDERER: "mujoco"
      RCB_ACTION_LEVEL: "low"
      RCB_PLAY: "program"
      RCB_ACT_RULE: "program"
      CLOCK_S: "3600"
      START_TIMEOUT_S: "1800"
      READY_TIMEOUT_S: "300"
      SEAT_HOSTS: ""
      RCB_RENDER_VIDEO: "1"
      RCB_BROADCAST: "1"
      RO_REPLAY_TIMEOUT_S: "600"
      RCB_VIDEO_TIMEOUT_S: "1200"
      RO_VIDEO_RENDERER: ""
      RO_READY_FROM_SHELL: "0"
      RO_T0: "barrier"
      LP_NUM_THREADS: "1"
      RO_CAMERA_PROCS: "2"
      RO_CAMERA_WORKERS: "4"
      RO_PNG_LEVEL: "1"
      RO_PLATFORM_CPUS: "last:8"
      PREPARE_TIMEOUT_S: "1800"
      MATCH_TIMEOUT_S: "6360"
      PLAYER_MODE_A: "unmetered"
      RO_METER_PROXY: "metering/none"
      RO_DEVWORLD_GATE: "/devgate/state.json"
      RO_VERDICT_REPLAY: "0"
      RO_COLLECT_ENDS_MATCH: "1"
      RCB_WALL_CLOCK_S: "7200"
  practice:
    cpus: 8   # rcb-monitor
    mem_limit: 8192m   # rcb-monitor
    pids_limit: 512   # rcb-monitor
    build:
      context: sim
      dockerfile: Dockerfile
    volumes:
      - rcb_observe:/run/rcb-observe:ro   # rcb-monitor
      - devworld_gate_trusted:/devgate:ro
    working_dir: /opt/practice_world
    command: ["python3", "-m", "core.practice"]
    cap_drop: [NET_RAW]
    environment:
      MUJOCO_GL: "osmesa"
      PYOPENGL_PLATFORM: "osmesa"
      OPENBLAS_NUM_THREADS: "1"
      OMP_NUM_THREADS: "1"
      RO_PLUGIN: "/opt/practice_world/sport/plugin.py"
      RO_SPORT: "tabletennis_g1"
      RO_FORMAT: "match"
      RO_SEATS: "A"
      RO_FIRST: "A"
      RO_LEVEL: "4"
      RO_SLOWDOWN: "1"
      RO_RENDERER: "mujoco"
      RCB_ACTION_LEVEL: "low"
      RCB_PLAY: "program"
      CLOCK_S: "3600"
      LP_NUM_THREADS: "1"
      PRACTICE_SEAT: "A"
      PRACTICE_PORT: "8100"
      PRACTICE_WORLDS: "4"
      PRACTICE_OPPONENTS: "none,practice_player"
      PRACTICE_PLAYER_URL: "http://localhost:8200"
      PRACTICE_TRUTH: "1"
      DEVWORLD_ACCESS: "throughout"
      DEVWORLD_GATE: "/devgate/state.json"
  practice_player:
    cpus: 1   # rcb-monitor
    mem_limit: 1024m   # rcb-monitor
    pids_limit: 64   # rcb-monitor
    volumes:   # rcb-monitor
      - rcb_observe:/run/rcb-observe:ro   # rcb-monitor
    build:
      context: sim
      dockerfile: Dockerfile
    working_dir: /opt/practice_player
    command: ["python3", "/opt/practice_player/practice_player_server.py", "serve"]
    cap_drop: [NET_RAW]
    environment:
      PRACTICE_PLAYER_CLASS: "partner:Partner"
      PRACTICE_PLAYER_PORT: "8200"
      OMP_NUM_THREADS: "1"
      OPENBLAS_NUM_THREADS: "1"
  # >>> rcb_monitor (resource monitor, PROTOCOL §6; generated by images/monitor/rcb_monitor/inject.py)
  rcb_monitor:
    image: ghcr.io/mll-lab-nu/efe:monitor-0.5.0@sha256:ecc5f24f1516ca11711d7c2d3ac07c89f79cd9220812c1244498ec71e352402a
    pid: host
    cgroup: host
    network_mode: none
    cap_add: [SYS_PTRACE]
    cpus: 0.5
    mem_limit: 256m
    pids_limit: 64
    restart: on-failure
    working_dir: /var/rcb-monitor
    volumes:
      - ./rcb_monitor/limits.json:/opt/rcb_monitor/limits.json:ro
      - rcb_limits:/run/rcb-limits
      - rcb_observe:/run/rcb-observe
    environment:
      RCB_LIMITS_ENFORCE: ${RCB_LIMITS_ENFORCE:-0}
      RCB_LIMITS_TOLERANCE: ${RCB_LIMITS_TOLERANCE:-0.05}
    command: ["python3", "/opt/rcb_monitor/monitor.py", "run"]
  # <<< rcb_monitor
volumes:
  rcb_limits:   # rcb-monitor
  rcb_observe:   # rcb-monitor
  devworld_gate_trusted: {}