class

Cloud::Provider

Inherits Reference < Object

Abstract provider interface — implement this for each cloud GPU service

Instance methods

create(offer : Offer, label : String = "microgpt", disk_gb : Int32 = 16, image : String = "nvidia/cuda:13.1.0-runtime-ubuntu24.04") : Instance

Create an instance from an offer

Source
destroy(instance_id : Int64) : Bool

Destroy an instance (irreversible)

Source
download(instance_id : Int64, remote_path : String, local_path : String = ".")

Download files from instance via SCP

Source
exec(instance_id : Int64, command : String) : ExecResult

Execute a command on the instance

Source
list

List all active instances

Source
name

Human-readable provider name

Source
search(gpu : String | Nil = nil, min_gpu_ram : Int32 = 0, max_price : Float64 = 10.0, min_reliability : Float64 = 0.9, num_gpus : Int32 = 1, limit : Int32 = 10) : Array(Offer)

Search for available GPU offers

Source
ssh(instance_id : Int64)

SSH into instance interactively

Source
ssh_key

SSH key path — override with CLOUD_SSH_KEY env var

Source
status(instance_id : Int64) : Instance

Get current instance status

Source
upload(instance_id : Int64, *paths : String, remote_dir : String = "/workspace")

Upload files/directories to instance via SCP

Source
wait_ready(instance_id : Int64, timeout : Int32 = 300, poll_interval : Int32 = 5) : Instance

Wait for instance to be ready (SSH available)

Source