Install
Usage
captures defaults to @external:
every program Mirage does not have itself. Name @python to run
Python on the machine too.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run captured programs on a boxd machine.
pip install 'mirage-ai[boxd]'
from boxd import AsyncBoxd
boxd = AsyncBoxd(region="fra")
machine = await boxd.machines.create("mirage-box", isolated=True)
await boxd.machines.wait_until_ready(machine.id)
print(machine.id)
captures defaults to @external:
every program Mirage does not have itself. Name @python to run
Python on the machine too.
from mirage import RAMVFS, MountMode, Workspace
ws = Workspace(
{"/data": RAMVFS()},
mode=MountMode.EXEC,
machines={
"box": {
"provider": "boxd",
"machine_id": "machine-id",
"region": "fra",
"captures": ["@python", "@external"],
}
},
)
await ws.shell("python3 -c 'print(1 + 1)'")