Jasmine

Build

S3 mounts

Mount an S3 bucket, or any S3-compatible store, as a folder in a running sandbox. It works in every template without installing anything.

Mount a bucket

typescript
const path = await sbx.mountS3({
  bucket: "datasets",
  prefix: "train",                   // optional
  endpoint: "https://<account>.r2.cloudflarestorage.com",   // omit for AWS S3
  accessKeyId, secretAccessKey,      // omit both for a public bucket
  readOnly: true,
});                                   // "/mnt/datasets" unless you pass path
await sbx.unmount(path);
python
path = sbx.mount_s3("datasets", prefix="train", access_key_id=key, secret_access_key=secret, read_only=True)
sbx.unmount(path)

How it works

  • The sandbox's init process doubles as FUSE's mount helper (fusermount), so slim images need no FUSE packages.
  • The daemon copies a pinned, checksum-verified rclone into the sandbox on its first mount, so templates stay small.
  • Credentials go in the mount process's environment, never on a command line.
  • Writes are uploaded about a second after a file is closed.

Self-hosted requirements

Mounts need FUSE in the guest kernel. setup-host.sh installs Jasmine's guest kernel (Firecracker's config plus FUSE) and rclone. Hosts set up before v0.1.2 keep their old kernel: remove /var/lib/jasmine/vmlinux, rerun setup, and rebuild templates.

HTTP: POST /v1/sandboxes/{id}/mounts and DELETE /v1/sandboxes/{id}/mounts?path=.