Skip to content

Your machine

On the machine:

Terminal window
pip install surfra
surfra login
surfra runner register # name it desk-4090
surfra runner start

Then deploy with the runner as the first row:

deploy.py
import surfra
app = surfra.App("desk-hello")
app.deploy(
image="ghcr.io/you/hello:1",
entrypoint="app.py",
runtime={"engine": "python"},
autoscale={
"max_replicas": 3,
"per_provider": True,
"providers": [
{"provider": "runner", "runner": "desk-4090", "priority": 1, "min_replicas": 1, "max_replicas": 1},
{"provider": "runpod", "gpu": "rtx4090", "priority": 2, "max_replicas": 2},
],
},
)

Your machine stays on as the base. When requests queue up, up to two RunPod replicas join and stop again after idle_timeout_sec. If your machine is off, the RunPod row takes over. See Your machines.