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.

4.2 KB
Raw Blame
# Realtime mode (PROTOCOL §3): the simulator runs in the `sim` sidecar (the agent cannot open it), on its own clock once an
# episode starts (sim/rcb_realtime.py); the agent only reaches port 8000.
# No `expose`/`ports` on sim: under Harbor's egress control it shares main's network namespace (localhost:8000).
# GPU on sim: MuJoCo physics is CPU either way, but every image the agent asks for is rendered here, and EGL on the
# GPU takes ~0.5 ms a frame against ~130 ms for CPU osmesa. `graphics` is the capability that mounts the EGL ICD.
services:
  main:
    pids_limit: 1024   # rcb-monitor
    volumes:   # rcb-monitor
      - rcb_limits:/run/rcb-limits:ro   # rcb-monitor
    depends_on: [sim]
  sim:
    cpus: 4   # rcb-monitor
    mem_limit: 4096m   # rcb-monitor
    pids_limit: 1024   # rcb-monitor
    x-gpu-memory-gb: 5   # GiB   # rcb-monitor
    build:   # environment/sim/Dockerfile: the base image, sim/ at /srv, the files shared with other tasks
      context: sim
      dockerfile: Dockerfile
    volumes:
      - rcb_observe:/run/rcb-observe:ro   # rcb-monitor
    command: python /srv/rcb_realtime.py
    restart: on-failure:6                               # a crash resumes the same episode, paused, never a reset
    environment:
      RCB_TASK: bookshelf_simple
      RCB_INSTANCE: /srv/instance.npz
      RCB_TASK_TEXT: "Put each of the five red-tinted objects (the other seven are grey) onto its place on the bookshelf, shown as a translucent copy of it in the same colour, one at a time, palest first and darkest last."
      RCB_EPISODE: "Ends when the summed reward reaches the pass mark (success), when the robot falls (its pelvis drops too low), when the object being placed goes below about half a metre, once all five are placed, after 1000 control steps, when your time is up (timeout), or on a simulator error."
      RCB_WALL_CLOCK_S: "3600.0"
      # Knobs: ${NAME:-default} takes NAME from the shell that runs harbor. The defaults are the standard
      # configuration; results under other settings are reported separately.
      RCB_SLOWDOWN: "${RCB_SLOWDOWN:-1}"                # 1: real time (official); S: one step every S x control_dt s, reported apart
      RCB_RESET_BUDGET: "${RCB_RESET_BUDGET:-50}"       # HumanoidBench's: 50 resets (PROTOCOL §2 exception; the mode's default is 0); 0: one episode
      RCB_OBS_PROPRIO: "${RCB_OBS_PROPRIO:-1}"          # 1: + joint angles/velocities; 0: images only
      RCB_OBS_IMU: "${RCB_OBS_IMU:-1}"                  # 1: + pelvis IMU (angular velocity, gravity direction)
      RCB_OBS_ROOM_CAMERA: "${RCB_OBS_ROOM_CAMERA:-1}"  # 1: + room_camera, fixed in the room
      RCB_OBS_DEPTH: "${RCB_OBS_DEPTH:-0}"              # 1: + depth (m) from both head cameras, as from the H1's head RGB-D camera
      RCB_ROOM_CAMERA_POSE: "0.85,-0.1,0.9,3.2,35,-20"  # room_camera behind the robot's right shoulder: every
                                                        # shelf, and the places the objects go, in view
      NVIDIA_DRIVER_CAPABILITIES: compute,graphics,utility
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
  # >>> 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"]
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
  # <<< rcb_monitor
volumes:   # rcb-monitor
  rcb_limits:   # rcb-monitor
  rcb_observe:   # rcb-monitor