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.

2.7 KB
Raw Blame
# Genesis renders camera images through EGL on the GPU (the physics runs on its bit-deterministic CPU backend). Harbor's
# local docker sandbox rejects [environment].gpus, but merging this onto the main service passes the device through.
# The BlenderKit models this task loads may not be redistributed, so they are not in the image: they come read-only
# from the host's folder $RCB_ROBOWITS_BLENDERKIT (images/robowits/NOTICE).
# The agent's container never sees that folder or its key: only the `blenderkit` service mounts it; it
# decrypts the models this family loads and serves them on localhost:8765, from where the tooling in `main`
# fetches them for each scene build (RCB_BLENDERKIT_URL; rcb_robowits.py blenderkit-serve).
services:
  main:
    pids_limit: 1024   # rcb-monitor
    x-gpu-memory-gb: 5   # GiB   # rcb-monitor
    volumes:   # rcb-monitor
      - rcb_limits:/run/rcb-limits:ro   # rcb-monitor
    shm_size: "2gb"
    depends_on: [blenderkit]
    environment:
      RCB_BLENDERKIT_URL: http://127.0.0.1:8765
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
  blenderkit:
    cpus: 1   # rcb-monitor
    mem_limit: 4096m   # rcb-monitor
    pids_limit: 1024   # rcb-monitor
    build:   # environment/blenderkit/Dockerfile: the base image and the task tooling from the files-only image
      context: blenderkit
      dockerfile: Dockerfile
    working_dir: /tmp
    volumes:
      - rcb_limits:/run/rcb-limits:ro   # rcb-monitor
      - ${RCB_ROBOWITS_BLENDERKIT:?set RCB_ROBOWITS_BLENDERKIT to your BlenderKit model folder (images/robowits/NOTICE)}:/bk:ro
    restart: on-failure:3
    command: ["python", "/srv/rcb_robowits.py", "blenderkit-serve", "--task", "raise_platform", "--src", "/bk", "--port", "8765"]
  # >>> 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
    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