Skip to main content

Size a container

cpu and memory are reservations the container always keeps. A pair adds a ceiling, so this function reserves 1 CPU and 2 GiB, is throttled at 4 CPUs, and is killed above 8 GiB. Smaller reservations start faster. One CPU is one vCPU. disk is scratch space, 100 GiB by default, gone when the container stops. Files that must last go in a volume.

Request a GPU

Models are GpuType.T4, A10G, L4, L40S, A100_40, A100_80, H100, and H200. A list is a preference order: gpu=[GpuType.H100, GpuType.A100_80, GpuType.Any] takes the first model with free capacity, and GpuType.Any at the end takes whatever is left. Plain GpuType.A100 is rejected because the two sizes aren’t interchangeable. gpu_count sets GPUs per container, and your plan sets which models you can use.

Preemptible capacity

Workloads run on cheaper preemptible capacity by default, which the provider can reclaim without notice. A preempted function call retries, and a preempted endpoint container is replaced, so functions that are safe to repeat lose little. preemptible=False keeps a workload on capacity that isn’t reclaimed, at a CPU and memory premium.

Placement

A workload runs where its workspace lives. Two options narrow that:
  • machine="gpu-1" pins the workload to a machine you joined. It runs there or fails.
  • region and availability_zone pin placement within the workspace’s cloud. Regions are "us-east", "us-west", "eu-central", "eu-north", and "ap-southeast". Pinning costs more, needs a plan that allows it, and can’t combine with machine.

Defaults

Scheduled functions default to keep_warm=0. Every workload defaults to disk="100Gi".

Options

Options apply to functions, endpoints, ASGI apps, and realtime handlers unless a row says otherwise. Pods and sandboxes take the sizing, storage, and placement options, and their pages list the rest.