> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beam.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Install the Beam CLI, sign in, and connect coding agents to the Beam MCP server with `curl -fsSL https://www.beam.cloud/install | sh`. To also create a VM, run `curl -fsSL https://www.beam.cloud/install | sh -s -- --vm`.
> VMs are persistent Linux machines without GPUs. Defaults: 4 CPUs, 8 GiB of RAM, a 50 GiB disk, Ubuntu 24.04, and a browser desktop. A running VM accrues usage until you stop, pause, or remove it, or until an idle timeout puts it to sleep.
> Stopping a VM keeps its disk and discards RAM and processes. Pausing keeps both, and resuming restores them. To pause after 5 idle minutes and wake on access, run `beam vm update NAME --ttl 300 --idle-action pause --auto-resume`.
> Core VM commands: `beam vm new NAME`, `beam vm ssh NAME`, `beam vm sync NAME ./dir`, `beam vm exec NAME -- CMD`, `beam vm expose NAME PORT --protected`, `beam vm fork NAME NEW_NAME`, `beam vm pause NAME`, `beam vm stop NAME`, `beam vm rm NAME`.
> For GPUs, use a sandbox or a deployed endpoint. Sandboxes are disposable environments that boot in seconds and fork from snapshots.
> Current rates are at https://www.beam.cloud/pricing.

# GPU Acceleration

## Running Tasks on GPU

Pass `gpu` to a Python workload or `--gpu` to a container deployment. Install your framework and its compatible CUDA dependencies in the runtime image.

```python theme={null}
from beam import function


@function(gpu="A10G", memory="2Gi")
def inspect_gpu():
    import subprocess
    return subprocess.check_output(["nvidia-smi"], text=True)


if __name__ == "__main__":
    print(inspect_gpu.remote())
```

## Availability

```bash theme={null}
beam machine list
beam pool offers --gpu H100 --nodes 1 --ttl 1h --max-spend 10
```

`beam machine list` reports live serverless availability and on-demand inventory. GPU model names supported by the SDK are not a promise that every model is currently available serverless. Review offers for price, provider, region, and capacity, then use [compute pools](https://docs.beam.cloud/v2/scaling/pools.md) for reserved hardware.

## GPU selection

A priority list lets the scheduler consider alternative types that your workload supports:

```python theme={null}
from beam import function


@function(gpu=["T4", "A10G", "RTX4090"], memory="2Gi")
def handler():
    return {"ok": True}
```

Ensure the model fits the smallest GPU in the list and that its libraries support each architecture. `gpu_count` requests multiple GPUs on a suitable machine. It does not distribute an application automatically; configure your framework's multi-GPU execution separately. Availability and workspace limits still apply.

## Regions and pools

Use a reserved offer's provider and region selectors when placement matters. Set the workload's `pool` to route it to that capacity. Use `beam machine list --help` and `beam pool --help` for the available filters and subcommands.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.