Sizes
A sandbox’s size decides how much CPU, memory and disk it gets. Bigger sizes do heavy work faster, and cost more per hour while they are awake:
You are billed per second while the sandbox is awake, and nothing for compute while it sleeps. Both runtimes cost
the same. To choose a size, pass it when you create the sandbox, then check what you got:
Response
Response
response
An exact amount
If none of the sizes fits, you can ask for an exact amount instead:cpu_cores (from 0.25 to 16) and memory_mb
(from 256 to 32768). The sandbox is then billed as the smallest size that covers both. For example, 3 cores and
6 GB is billed as medium.
What the default image has
If you do not choose an image, the sandbox starts from Fibre’s default image. It is Debian Linux, with the tools an agent usually reaches for first already installed:
You can check the versions yourself with a single command:
Response
Response
response
Install what is missing
Inside the sandbox you are theroot user and the network is open, so you can install anything you need, with
the usual tools: pip for Python, npm for Node and apt-get for system packages.
Installs often take longer than the 30 seconds an exec allows, so run them as
background commands. In the SDKs, sbx.run() does that for you:
curl: wait for it
Output
Output
output
Bring your own image
You are not limited to the default image. Any image from a public registry, such as Docker Hub, can be the starting point for a sandbox. Name it inimage, and add "ready": "process" (explained below):
curl: check, then clean up
Response
Response
response
- The first sandbox from a new image takes a little longer, because Fibre has to download the image. Later sandboxes from the same image start quickly.
"ready": "process"tells Fibre the sandbox is ready as soon as it starts, and Fibre keeps it running so you can run commands in it. That is what you want for a general-purpose image such aspython,nodeorubuntu.- The browser features need Chromium, which the default image includes. A custom image without Chromium can still run code and commands, but not the browser.
Related
Pricing and limits
Plans, storage and a worked monthly cost.
Runtimes
When the workload needs Docker or a full VM.