By the end of this quickstart you’ll have a custom Docker container running as a Bring Your Own Container (BYOC) pipeline on a local Livepeer network, a job routed to it through a gateway and orchestrator, and verified output coming back. The path uses a green-tint frame processor (the simplest possible BYOC contract) andDocumentation Index
Fetch the complete documentation index at: https://na-36-handover-docs-v2-into-docs-v2-dev-20260518.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
-network offchain mode. Once this works, you understand the full BYOC lifecycle; production deployment is the same architecture against a registered orchestrator with on-chain payment attached.
This is the Persona 3 activation moment. The transcoding quickstart proved the gateway-orchestrator-pipeline lifecycle; this quickstart proves you can plug arbitrary compute into it. The reference applications live at and the SDK at .
Required Tools
Four things on one Linux amd64 machine:go-livepeerbinary or Docker (from the )- Docker Engine 24 or later
- Python 3.10 or later with
pip - Four free terminals
go-livepeer installed and verified. Run ./livepeer -version to confirm.Container Build
The simplest BYOC contract is one Python class with one method: receive raw bytes, return raw bytes. PyTrickle wraps that class in an HTTP server speaking the trickle protocol.Write the processor
processor.py. This boosts the green channel on every frame.process() is the only method the contract demands; initialize() and shutdown() are useful for model loading and cleanup.Write the Dockerfile
Dockerfile.python:3.11-slim keeps the image small. For GPU inference, swap the base to nvidia/cuda:12.x-runtime-ubuntu22.04 and add --gpus all to your docker run commands.Container Isolation Test
Before wiring into the network, confirm the container starts cleanly and accepts a frame.Hit the status endpoint
200 OK confirms the trickle server is accepting requests. The body shape varies; what matters is the status code.Network Wiring
The container is a capability. The orchestrator advertises that capability to the gateway. The gateway routes matching jobs to the orchestrator, which routes them to the container.Start the BYOC container in host mode
--network host lets the orchestrator reach the container at localhost:8000. Acceptable for local development; production deployments use a Docker network or Kubernetes service.Start the orchestrator with the BYOC capability
| Flag | Effect |
|---|---|
-byoc | Enable BYOC mode on this orchestrator |
-byocContainerURL | URL of the running BYOC container |
-byocModelID | Capability name advertised to gateways; arbitrary string |
First Job
Inspect the result
Job Lifecycle
green-tint-cpu) that the orchestrator advertises and the gateway routes against. Any unique string works. Production orchestrators publish their capability set to the on-chain registry.
Trickle protocol. The HTTP convention the orchestrator uses to push frames to the container and pull results back. PyTrickle implements both sides so the processor only writes the process() method.
FrameProcessor contract. One required method: process(bytes) -> bytes. Optional initialize() runs once on container start; optional shutdown() runs on job end. Any Python library that runs in the container can be loaded in initialize().
Per-second compute. In on-chain mode, BYOC jobs are paid per second of GPU compute under . Off-chain mode skips payment but exercises the same routing.
Common Errors
No orchestrator advertising capability green-tint-cpu
No orchestrator advertising capability green-tint-cpu
BYOC capability registered: green-tint-cpu. If not, check the -byoc, -byocContainerURL, and -byocModelID flags match what the gateway expects.Container connection refused from orchestrator
Container connection refused from orchestrator
--network host, the container must bind to 0.0.0.0:8000 and the orchestrator must use 127.0.0.1:8000. Confirm the container log shows Trickle server listening on port 8000. If using a custom Docker network, the container hostname goes in -byocContainerURL.Gateway returns 400 on job submission
Gateway returns 400 on job submission
X-Model-Id header doesn’t match any advertised capability. Confirm the header value matches -byocModelID exactly. Capability names are case-sensitive.Container starts but process() raises an error
Container starts but process() raises an error
process() expects. Black frames at 640x480x3 = 921600 bytes work with the green-tint processor. For real video, the gateway negotiates frame format; for direct testing, the bytes-in must match bytes-out.Port conflict on 8000, 8935, or 8936
Port conflict on 8000, 8935, or 8936
-byocContainerURL, -httpAddr, and -serviceAddr to free ports.Next Steps
BYOC Architecture
BYOC Production
BYOC SDK
@muxionlabs/byoc-sdk for browser clients with WebRTC streaming.