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.

524 B
Raw Blame
# docs: test="container"
import asyncio

import cua


async def main():
    c = cua.embedded()
    sb = await c.sandboxes().create(cua.SandboxCreateOptions(
        on="local",                                    # or "aws"
        image=cua.canonical_image("linux", None),
        name="dev",
        wait_for=[cua.ReadinessProbe(service="env")],  # until its spacesd answers
    ))
    guest = await sb.spacesd(None)
    print((await guest.sh("uname -a", None)).stdout.decode())
    await sb.delete()


asyncio.run(main())