SandboxRuntime#

class ray.experimental.sandbox.SandboxRuntime[source]#

Bases: object

Low-level interface for managing local sandbox runtime environments.

PublicAPI (alpha): This API is in alpha and may change before becoming stable.

Methods

check_resources

Reject unsupported resource limits before downloading an image.

checkpoint

Create a checkpoint of the running sandbox.

create

Provision the sandbox instance and return unique instance ID.

delete

Clean up and terminate the sandbox instance.

delete_async

Clean up and terminate the sandbox instance asynchronously.

download_file

Copy file from the sandbox to local.

exec

Execute a command inside the specified sandbox.

exec_async

Execute a command inside the specified sandbox asynchronously.

get_status

Query operational status of the sandbox.

get_termination_reason

Report an unexpected runtime exit, including a cgroup OOM kill.

pause

Pause a running sandbox instance.

pull_image

Download and extract container image into local cache.

read_file

Read binary content from a file inside the sandbox.

restore

Restore a sandbox instance from a previously saved checkpoint.

resume

Resume a paused sandbox instance.

set_egress_allowlist

Replace the egress allowlist of a network="public" sandbox.

terminate

Clean up and terminate the sandbox instance.

upload_file

Copy local file into the sandbox.

write_file

Write string or binary content directly to a file inside the sandbox.

Attributes

backend

The backend instance used by this runtime.

image_manager

The ImageManager instance used by this runtime.