Salad Cloud¶
sky.Salad uses Salad Container Engine. The adapter creates one container group per node, each with a single replica.
The adapter needs skyward[salad], which brings salad-cloud-sdk and websockets. Without it the daemon does not register the kind.
import skyward as sky
provider = sky.Salad(
api_key="...",
organization="my-org",
project="training",
priority="low",
)
The API key can come from SALAD_API_KEY. organization and project can come from SALAD_ORGANIZATION and SALAD_PROJECT; the project name is lowercased. ssh_key, needed unless transport is gateway, can come from the file SALAD_SSH_KEY_FILE names, else from ~/.ssh/id_ed25519; see how a node is reached.
priority (high, medium, low or batch) selects the price and how readily the workload is preempted. spot allocation is not available; every offer is on-demand, billed per second.
The base image is a CUDA runtime image unless image or Image(base=...) names another. An image that already carries sshd, curl and websocat is used as is; otherwise it must be Debian or Ubuntu based, because the container command installs them with apt-get. storage_gb is the container's storage, and Salad's floor is 1 GiB.
min_download_mbps and min_upload_mbps hold a node to a download and an upload speed. Salad has no filter for either — a node is somebody's home computer, on whatever connection their ISP sold them, and a home connection usually uploads at a fraction of what it downloads, so each direction has its own floor. When one is set, the container measures that direction against Cloudflare's speed test before sshd comes up, three attempts twenty seconds apart, download first, and a node short of it on every attempt asks Salad to reallocate the replica. An attempt is eight transfers at once, of at most fifteen seconds each, and the speed is what they moved together over the time they took: one TCP connection carries a fraction of a link, so one transfer would measure the connection rather than the node. What the check prints is the node's progress while it boots, and the daemon's log keeps it. The reallocation moves it to another machine and keeps the rejected one out of this account's pool for 48 hours, which is the cost of the knob: set the speed the workload needs, not the one it would like. A speed test that does not answer is not held against the node. Unset, that direction is not measured.
skyward.Salad
¶
Bases: Provider
Salad, reached through its own container gateway.
organization and project are not optional to the provider — they are
the account's namespace — only optional here, where the environment may
answer for them.
request_timeout is short because the api is polled: every pass of the
reconciler lists the compute's groups and asks each one for its instances, so
a request left waiting holds the compute still for as long as it waits. Salad
answers in under a second when it answers at all; a request past a few seconds
is a request its sdk will retry.
kind = 'salad'
class-attribute
¶
api_key = None
class-attribute
instance-attribute
¶
organization = None
class-attribute
instance-attribute
¶
project = None
class-attribute
instance-attribute
¶
priority = 'low'
class-attribute
instance-attribute
¶
country_codes = None
class-attribute
instance-attribute
¶
image = None
class-attribute
instance-attribute
¶
storage_gb = 50
class-attribute
instance-attribute
¶
min_download_mbps = None
class-attribute
instance-attribute
¶
min_upload_mbps = None
class-attribute
instance-attribute
¶
The download and upload speeds a node must show before it is kept, in megabits per second.
Salad has no filter for either: a node is somebody's home computer, on whatever connection their ISP sold them, and a home connection usually uploads at a fraction of what it downloads — which is why each direction has a floor of its own. Set, the container measures that direction before sshd comes up, over eight connections at once since one carries a fraction of a link, and a node short of it on every attempt asks Salad to reallocate the replica — which moves it to another machine and keeps the rejected one out of this account's pool for 48 hours. That exclusion is the cost of the knob: it is the speed the workload needs, not the one it would like. Unset, nothing is measured.
transport = 'any'
class-attribute
instance-attribute
¶
Which of Salad's two ways into a container the daemon reaches a node by.
ssh is the SSH relay the portal shows, an exec into the container from
Salad's side that needs no inbound path at all; it needs ssh_key, and on
some nodes Salad's SSH server takes the connection and never answers.
gateway is the Container Gateway, the HTTP reverse proxy Salad puts in
front of one port; it reaches the container over IPv6, on a node where that
path never forms it answers 503 for as long as the node lives, and it ends
every link after a few minutes. any sounds both and takes the relay where
it answers and the gateway where it does not, which is what covers a node
either one fails on; it needs ssh_key too.
ssh_key = None
class-attribute
instance-attribute
¶
The private key whose public half is registered in the Salad portal, under SSH Keys.
Required unless transport is gateway. The portal holds one key per user,
registered by hand, and the relay admits nothing else, so this is the account's
rather than a compute's: the ephemeral key sshd takes is still minted per
compute and travels inside. The contents of the file SALAD_SSH_KEY_FILE
names answer when it is left unset, and those of ~/.ssh/id_ed25519 when
that is unset too.
vcpu_price = 0.005
class-attribute
instance-attribute
¶
memory_price = 0.001
class-attribute
instance-attribute
¶
What a CPU-only node costs, per vCPU-hour and per GB-hour.
Salad publishes no CPU catalogue — list_gpu_classes is the only thing it
quotes — so the price of a CPU-only offer is computed from these rather than
fetched. They are the published rates at the time of writing and the account
is what settles it, which is why they are here and not a constant.
A GPU class is unaffected: Salad bills no vCPU or RAM alongside one, and its quoted price is the whole of it.
request_timeout = 5
class-attribute
instance-attribute
¶
countries
property
¶
What the account is offered¶
Salad sells nodes with a GPU and nodes without, and prices only the first. The adapter offers both.
A GPU class carries its own price, one per container priority, and Salad bills no vCPUs or RAM beside it — the quoted price is the whole node, at any size. A class is therefore one offer, published at the largest group the adapter sells (16 vCPUs, 32 GiB) so that a compute asking for any size up to it is sold the class.
A CPU-only node is the same container group without a GPU class, billed per vCPU-hour and per GB-hour. Salad sizes a container group from the request that creates it and quotes no CPU catalog over its API, so every size between 1 and 16 vCPUs and between 1 and 32 GiB is offered — 512 of them, priced cpus × vcpu_price + memory_gb × memory_price. Nothing is rounded to a list of sizes somebody chose: asking for 5 vCPUs and 7 GiB buys 5 vCPUs and 7 GiB. The default rates are Salad's published ones as of September 2026; check them against your account, since nothing in the API quotes them back.
priority selects a GPU class's price. Salad's published CPU-only rates do not vary by priority, and its pricing page states CPU-only groups run at the lowest tier; whether an account is ever billed a different CPU rate per priority is not something the API answers, so vcpu_price and memory_price are single values.
The container is created at the compute's cpus and memory_gb. What the compute leaves out comes from the offer that was bought: on the CPU-only shelf the size the market picked, which is the cheapest that fits and for a compute that names neither is 1 vCPU and 1 GiB; on a GPU class the largest size, which costs nothing more.
A compute that names no accelerator is sold a CPU node, even where a GPU class would be cheaper — and on Salad one often is, since a class bundles its vCPUs and RAM. The saving is not the whole price: a GPU class places only on machines carrying that GPU, a smaller pool than a CPU node runs on. Name accelerator to buy one deliberately.
How a node is reached¶
Salad gives a container two ways in, neither of them inbound TCP to the node, and transport says which the daemon uses:
sshis the SSH relay shown in the Salad portal: anexecinto the container from Salad's side, over IPv4, admitted on the key registered in the portal under SSH Keys. It needsssh_key, the private half of that key, read from~/.ssh/id_ed25519unlessSALAD_SSH_KEY_FILEnames another file; the portal holds one key per user, registered by hand, and an account without one is refused when it is registered. On some nodes Salad's SSH server takes the connection and never sends its banner, for as long as the node lives; on others it closes the connection before the banner.gatewayis the Container Gateway, an HTTP reverse proxy in front of a single port, and the one way that needs no key. It reaches the container over IPv6, and on a node where that path never forms it answers 503 for as long as the node lives, with the container running and Salad calling the instance ready.any(the default) sounds both at every pass until one answers, and takes the relay where it answers and the gateway where it does not, which is what covers a node either one fails on. A node both reach is bridged over the relay, even when the gateway answered first, because the gateway ends every link after a few minutes. It needsssh_keytoo.
The way a node is first reached by is the one it keeps. A node that no way reaches stays pending, and the daemon's log says at every pass how each way failed; a node given up on at the provision deadline carries the same reasons in its error.
Either way is made to look like a socket. Each container runs sshd behind a WebSocket-to-TCP bridge on the gateway port, and the daemon runs one loopback listener per node whose connections become links to that node: a WebSocket to its gateway domain, or a session of the relay running the same websocat as a stdio-to-TCP bridge to the same sshd. Everything above the adapter dials an ordinary host and port. The relay is held to the host key fingerprint Salad publishes for the instance, execs on a PTY the bridge puts in raw mode, and allows no port forwarding of its own, which is why sshd stays inside; measured on one node, it carried 34 Mbps up and 53 down, and held a session for a quarter of an hour where the gateway ends every link after a few minutes.
Two consequences follow from the gateway:
- Its domain name addresses a container group and load balances across that group's replicas, so a node is its own group of one. That is also what makes a single node individually terminable.
- It cannot carry the
Salad-Api-Keyheader on a WebSocket upgrade, so the gateway is opened unauthenticated. A node is protected by its unguessable domain name and by sshd accepting Skyward's ephemeral key and nothing else.
Nodes still have no way to reach each other, so cluster formation is rejected: a Salad compute is a fleet of independent nodes. Leave options.cluster unset or False.