The Dockerfile uses a multi-stage build with CUDA base images for GPU support. The build process supports cross-compilation for multiple architectures.
VideoAICreate the docker-compose.yml file that defines the dual gateway service.
Replace <http://ORCHESTRATOR_IP:PORT> with your locally running orchestrator address
fix me
See flag details below:
Required Flags
Recommended Flags
See Example transcoding options json below:
Transcoding Options Example
3
Run Gateway
4
Test Gateway
Fix me (onchain nicer)
Video
AI
Send a video stream to the gateway:
You need a video file called test-video.mp4 on your machine!
From a host terminal (not in Docker or Volume), run this command:After streaming, check the HLS playback output:Tips:
Replace localhost with your gateway’s IP if running remotely
The stream name (test) becomes part of the HLS playback URL
To test AI functionality in Livepeer, you can make HTTP requests to the AI endpoints exposed by your gateway.
The gateway routes these requests to orchestrators with AI workers for processing.Use the AI API to test functionality of available models.
The -monitor=true flag in the docker-compose.yml already has basic monitoring enabled which exposes metrics in Prometheus format at http://localhost:8935/metrics.Metrics collected include:
+-----------------------------------------------------------+| Welcome to livepeer-cli, your Livepeer command line tool |+-----------------------------------------------------------+What would you like to do? (default = stats) 1. Get node status2. View protocol parameters3. List registered orchestrators4. Invoke "initialize round"5. Invoke "bond"...
AI-Specific Monitoring
AI-Specific MonitoringFor AI workflows, the gateway sends detailed events including:
Stream request events
Orchestrator selection info
Ingest metrics
Error events
Enhanced Monitoring Options
Enhanced Monitoring OptionsAdd to your Docker Compose for more monitoring:
Basic Connectivity Tests:These tests verify the gateway is running and can discover orchestrators:
On-Chain Specific Tests
On-Chain Specific Tests:Before testing, ensure your on-chain gateway is properly configured.
The gateway must have an active Ethereum connection and valid account:
Payment Tests
Payment Tests:For on-chain gateways, test the payment system:
You need a video file called test-video.mp4 on your machine!
AI Tests
AI Tests:AI Capability Tests:
Expected Results
Expected ResultsSuccessful Test Indicators
Status endpoint returns valid Ethereum address
Orchestrators list shows pricing and ticket parameters
Video streams generate HLS playlists
AI endpoints return processed results
Payment operations complete without errors
Common Issues
No orchestrators found: Check -orchAddr configuration
Payment errors: Verify ETH balance and gas settings
AI failures: Ensure -aiServiceRegistry is set for on-chain AI
Connection timeouts: Check firewall and network settings
Notes
On-chain tests require ETH in the gateway account for transactions
Test on a testnet first (e.g., arbitrum-one-goerli) before using mainnet
Monitor gas costs during testing
The test suite includes on-chain validation tests test_args.sh
Use -localVerify=false to skip local verification if needed
6
Monitor Gateway
The -monitor=true flag in the docker-compose.yml already has basic monitoring enabled which exposes metrics in Prometheus format at http://localhost:8935/metrics.Metrics collected include:
+-----------------------------------------------------------+| Welcome to livepeer-cli, your Livepeer command line tool |+-----------------------------------------------------------+What would you like to do? (default = stats) 1. Get node status2. View protocol parameters3. List registered orchestrators4. Invoke "initialize round"5. Invoke "bond"...
AI-Specific Monitoring
AI-Specific MonitoringFor AI workflows, the gateway sends detailed events including:
Stream request events
Orchestrator selection info
Ingest metrics
Error events
Enhanced Monitoring Options
Enhanced Monitoring OptionsAdd to your Docker Compose for more monitoring:
The Gateway needs to connect to at least one orchestrator for services.If you’re running your own Orchestrator, you can use this by setting the -orchAddr flag.
For on-chain mode, orchestrator discovery happens automatically but you need to ensure your gateway has ETH for transactions.
Show See More Explorer Information
The Livepeer Explorer Orchestrator Performance Leaderboard can also show you a list of all available Orchestrators & their capabilities & services.
The Performance Leaderboard is provides real-time operational metrics that directly impact gateway performance, while the main Orchestrators page helps with understanding the economic landscape and potential delegation opportunities.
Show Automatic Orchestrator Discovery System
When you start an on-chain gateway (-network arbitrum-one-mainnet), it automatically creates a DBOrchestratorPoolCache that polls the blockchain for registered Orchestrators.Unlike off-chain mode where you specify -orchAddr, on-chain gateways:
Discover all public orchestrators automatically
Update the list periodically (every 25 minutes)
Handle failures by trying alternative orchestrators
Orchestrator Discovery Initialisation
The discovery process queries the BondingManager smart contract to get all registered orchestrators with different validation rules
for different node types - transcoders require explicit orchestrator addresses while gateways can operate with or without them.The discovery system fetches:
All registered orchestrators from the BondingManager contract
Their capabilities (video transcoding profiles, AI models)
Pricing information for each capability
Performance metrics and capacity
Capability MatchingWhen processing requests, the gateway:
Queries discovered orchestrators for required capabilities discovery.go:160-174
Filters by price limits (-maxPricePerUnit for video, -maxPricePerCapability for AI)
Selects based on performance and availability
Docker Tips & Tricks
Verify these
If you wanted to build a go-livepeer Docker image, you can do so from the root of the repository using this: