Adding a GPU to a function
Beam offers a fast way to spin up GPU runtimes for development.
You can add a GPU to your runtime by passing a
gpu argument to your
Runtime. Currently, available GPU options are
T4 (16Gi), or
You can also pass in an
any argument, which will use whichever GPU is available when you run your app.
Due to ongoing capacity limitations, certain machines may not be available on-demand.
from beam import App, Runtime app = App(name="gpu-app", runtime=Runtime(gpu="T4")) @app.run() def inference(): print("📡 This is running on a GPU!")