Self-host on your own box
turion migrate --to ssh://[user@]host puts a Cog model on a machine you control: a lab box, an
on-prem GPU server, a rented bare-metal host. No Turion account is involved; the model runs
entirely on your hardware.
turion migrate --from cog:whisper-demo:latest --to ssh://ubuntu@gpu-box# done: http://gpu-box:5000What it does
Section titled “What it does”One command, five steps, all over plain ssh and scp:
docker savethe image to a tarball locallyscpit to the hostdocker loadit theredocker run -d --restart unless-stopped -p <port>:5000(plus--gpus allwhen GPUs are on)- Poll the Cog server’s
/health-checkuntil it reportsREADY, then print the URL
If setup fails inside the container you get setup_failed with the health output. If the server
is not ready after about a minute you get timeout; the container keeps starting, so a model that
loads slowly may still come up, and /health-check tells you when. The transfer tarball is removed
from both machines either way. The container restarts with Docker (--restart unless-stopped),
so the model survives a reboot of the box.
Prerequisites
Section titled “Prerequisites”On your machine:
- Docker, and the image present locally
- non-interactive, key-based SSH access to the box (every step runs unattended)
On the box:
- Docker, runnable by the SSH user
curl(used for the health poll)- For GPU serving: an NVIDIA driver and the
NVIDIA Container Toolkit,
so
docker run --gpus allworks
It ships images, not projects
Section titled “It ships images, not projects”The SSH target needs a runnable image. Build the project first, then migrate the image:
turion cog build ./whisper-demo -t whisper-demo:latestturion migrate --from cog:whisper-demo:latest --to ssh://ubuntu@gpu-boxA replicate: source works too when the image pull succeeds (see
Migrate from Replicate), but a scaffold cannot be shipped over
SSH (scaffold_only): implement and build it first.
--port and --gpus
Section titled “--port and --gpus”| Flag | Default | Description |
|---|---|---|
--port | 5000 | host port mapped to the Cog server’s port 5000 |
--gpus/--no-gpus | probe | force GPUs on or off; by default nvidia-smi -L is run over SSH and GPUs are used if it succeeds |
turion migrate --from cog:whisper-demo:latest --to ssh://ubuntu@gpu-box --port 8080 --no-gpus# done: http://gpu-box:8080Calling your private server
Section titled “Calling your private server”What runs on the box is a plain Cog HTTP server, the same one
turion cog predict talks to locally. Call it directly:
curl -s http://gpu-box:5000/health-check# {"status": "READY", …}
curl -s http://gpu-box:5000/predictions \ -X POST -H "Content-Type: application/json" \ -d '{"input": {"audio": "https://example.com/sample.wav"}}'# {"status": "succeeded", "output": {"text": "…", "language": "en"}}POST /predictions runs synchronously and returns the output JSON. This is the raw Cog server,
with no authentication, no queue and one container. Keep it on a private network or behind a
firewall or VPN rather than exposing the port to the internet.
Where this fits
Section titled “Where this fits”ssh:// is for a single box you manage yourself: you get a direct HTTP endpoint and you own
uptime, scaling and access control. --to turion gives you the registry, versioning, auth and the
prediction API, with the model running on machines you join to a
fleet.