Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

2.1 KB
Raw Blame
# Generated by scripts/images/gen-image-constants.py from libs/images/sandbox-images.json,
# the bench lock files and cua-image's canonical.rs. Do not edit: change a source and
# rerun `python3 scripts/images/gen-image-constants.py`.
"""The images cua-bench runs: the canonical defaults and the benchmark images.

Each benchmark's Linux guest ships as two indexes linked by
``ai.cua.image.variants``: ``<ver>`` (rootfs: docker / gVisor) and
``<ver>-disk`` (containerDisk: QEMU / KubeVirt). ``BENCH_<NAME>`` pins the
rootfs index by digest (the one its lock file records); the resolver follows
its link to the disk index when ``--kind vm`` needs it. Override one for a
run with ``CUA_BENCH_IMAGE_<NAME>`` (e.g. ``CUA_BENCH_IMAGE_BENCH_WEB``) or
``--image``.
"""

from __future__ import annotations

import os

#: The default image per OS (``cua_image::canonical``), used when the SDK
#: cannot be loaded.
CANONICAL = {
    "linux": "ghcr.io/trycua/linux:24.04",
    "windows": "ghcr.io/trycua/windows:2022",
    "macos": "ghcr.io/trycua/macos:26",
}

#: Web benchmarks: MiniWoB, WebVoyager, Online-Mind2Web and WebGym tasks.
#: Guide: /cua-bench/guides/adapter-benchmarks#bench-web. Lock: libs/images/bench/web/lock.json.
#: Pinned to ghcr.io/trycua/bench-web:1.0-20261002-01636cb.
#: Floating ghcr.io/trycua/bench-web:1.0 (promoted: yes).
BENCH_WEB = "ghcr.io/trycua/bench-web@sha256:3b7e1d9d4e34694175cf1b44ffefc09b557c94b1c8f946fe50646d68df39ca87"

#: OSWorld-Verified: OSWorld Verified desktop tasks.
#: Guide: /cua-bench/guides/adapter-benchmarks#osworld-verified. Lock: libs/images/bench/osworld/lock.json.
#: Pinned to ghcr.io/trycua/bench-osworld:verified-20261003-fe6d89d.
#: Floating ghcr.io/trycua/bench-osworld:verified (promoted: yes).
BENCH_OSWORLD = "ghcr.io/trycua/bench-osworld@sha256:e55cf3a314793f89be7efbffdc043aab29bf85990c6213a9ebbb204825504439"


def image(name: str) -> str:
    """``BENCH_WEB`` / ``BENCH_OSWORLD``, or its ``CUA_BENCH_IMAGE_<NAME>`` override."""
    default = globals()[name]
    return os.environ.get(f"CUA_BENCH_IMAGE_{name}", "").strip() or default


__all__ = ["CANONICAL", "BENCH_OSWORLD", "BENCH_WEB", "image"]