• Stefy Lanza (nextime / spora )'s avatar
    host backend: a capability image on a machine you already have · 8310821e
    Stefy Lanza (nextime / spora ) authored
    The capability images are ordinary containers; nothing about them needs RunPod.
    The same image can run on a box you own, a server rented by the month, a second
    GPU in the next room — and coderai should use it the way it uses a pod: per
    model, with an endpoint and a token, and nothing else.
    
      always on:  {"backend": "host", "host": {"url": ..., "api_key": ...}}
      on demand:  add start_cmd (+ optional stop_cmd, boot_timeout_s, idle_timeout_s)
    
    start_cmd is whatever starts the thing — docker run, ssh box docker start, a
    systemd unit. coderai runs it, waits for /healthz, uses the host, and runs
    stop_cmd after idle_timeout_s with nothing in flight. It only ever stops a host
    it started itself; one that was already up is never touched.
    
    Deliberately absent: GPU search, price ranking, budgets, spot, capacity
    fallback, the orphan reaper. Those exist because a cloud rents an anonymous
    card by the second and can lose it. A host is a named machine you are
    responsible for — the machinery would be wrong, not just unnecessary.
    
    Verified for real: a capability container started by command from a cold
    state, healthy in 6s, used, and stopped by the idle timer.
    
    Also fixed on the way: a plain service_url carried no token, so a hand-run
    capability image behind one answered 401 to everything. service_token travels
    now. Neither host nor service_* is seeded to a pod: they say where a model runs
    from HERE, and would make a pod try to forward to itself.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0182DhR1eFNPQyGmDrpHbedY
    8310821e
runpod_worker.py 114 KB