Skip to content

Recipes

These recipes show how the main product flows fit together.

Remote GPU Devbox

cd my-project
m-gpux dev

Choose your profile, compute, dependencies, and excludes. Save a preset when prompted if you expect to reuse the setup.

Later:

m-gpux sessions list
m-gpux sessions pull <session-id> --to ./m-gpux-workspace
m-gpux sessions stop <session-id>

RL Training Loop

m-gpux dev
python train_lamarckian_rl.py

On the next launch, local code edits overwrite matching files in the Volume, while remote-only folders such as experiments/ remain.

Reusable Preset

m-gpux preset create
m-gpux preset run rl-a100

Use this when you repeatedly select the same GPU, dependency setup, and exclude patterns.

Web App Hosting

m-gpux host asgi --entry main:app

Use host for FastAPI, Flask, Django, or static sites when you want a stable Modal URL.

Compose Stack On Modal

cd my-compose-project
m-gpux compose check
m-gpux compose up

When the stack needs fuller image semantics or multiple tunneled ports:

m-gpux compose vm check
m-gpux compose vm up

If you keep iterating on the code after launch:

m-gpux compose sync

Recover Remote Files

If you created files inside a Hub/dev terminal:

m-gpux sessions list
m-gpux sessions pull <session-id> --to ./remote-output

If you only know the Volume name:

modal volume get <volume-name> / ./remote-output