From 7274f9bdc702f73dfccb5f7cfcccd88df0772f8d Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Wed, 12 Aug 2026 19:30:00 +0200 Subject: [PATCH] chore: depend on the released SDK and orchestrator livepeer-gateway 1.0.0 is on PyPI, so the git pins go away: pyproject asks for >=1.0.0, the [tool.uv.sources] blocks are gone, and the Dockerfiles no longer install git just to clone the SDK. go-livepeer v0.9.1 carries the session-scoped payment URL (#4008) that kept compose on a master build, so the orchestrator moves to the release tag. The previous pin is an ancestor of v0.9.1, so this is strictly newer. Verified: uv resolves 1.0.0 from the registry, hello-world builds with --no-cache and no git layer, and both the single-shot and trickle paths run end to end against v0.9.1. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 8 ++++---- api-proxy/README.md | 2 +- api-proxy/pyproject.toml | 6 +----- compose.onchain.yml | 2 +- compose.orchestrator.yml | 2 +- echo/Dockerfile | 6 +----- echo/README.md | 6 +++--- echo/pyproject.toml | 6 +----- hello-world/Dockerfile | 7 +------ hello-world/README.md | 4 ++-- hello-world/pyproject.toml | 6 +----- realtime-transcription/Dockerfile | 6 +----- realtime-transcription/README.md | 4 ++-- realtime-transcription/pyproject.toml | 6 +----- tiles/Dockerfile | 7 +------ tiles/README.md | 4 ++-- tiles/pyproject.toml | 6 +----- vllm/README.md | 2 +- vllm/pyproject.toml | 6 +----- 19 files changed, 27 insertions(+), 69 deletions(-) diff --git a/README.md b/README.md index 78868cb..1cda2bc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Example **apps that run on** the Livepeer **live runner** — [go-livepeer](http The point is to **swap the compute without changing your app — permissionlessly, no lock-in**. Your app stays a plain service with little or no Livepeer-specific code, so you're never tied to us. And the network is permissionless: anyone can run or extend it, no one gatekeeps what you deploy, and no single party can take your app down. Write the app once; **move the compute freely**. > [!NOTE] -> Live runners ship in mainline go-livepeer since [v0.9.0](https://github.com/livepeer/go-livepeer/releases/tag/v0.9.0). The Python SDK is installed from its `main` branch until it is published to PyPI. +> Live runners ship in mainline go-livepeer since [v0.9.0](https://github.com/livepeer/go-livepeer/releases/tag/v0.9.0), and the Python SDK is on PyPI as [`livepeer-gateway`](https://pypi.org/project/livepeer-gateway/). ## How it works @@ -110,12 +110,12 @@ Each example is self-contained and its README has the run commands. Everything b ### Prerequisites -- **Docker** for the end-to-end demos, so there is nothing to build. They currently run a mainline `livepeer/go-livepeer` master build rather than a release image: metered pricing needs the session-scoped payment URL added after v0.9.0 ([#4008](https://github.com/livepeer/go-livepeer/pull/4008)). They move back to a release tag once one carries it. +- **Docker** for the end-to-end demos, so there is nothing to build. They run the `livepeer/go-livepeer:v0.9.1` release image. - **Python 3.12+** and [`uv`](https://docs.astral.sh/uv/) for the client. -- The **`livepeer-gateway` SDK** from its `main` branch (not yet on PyPI): +- The **[`livepeer-gateway` SDK](https://pypi.org/project/livepeer-gateway/)** (`uv run` installs it for you from each app's `pyproject.toml`): ```sh - pip install "git+https://github.com/livepeer/livepeer-python-gateway@main" + pip install "livepeer-gateway>=1.0.0" ``` ### Shared components diff --git a/api-proxy/README.md b/api-proxy/README.md index 003a895..b6eb198 100644 --- a/api-proxy/README.md +++ b/api-proxy/README.md @@ -11,7 +11,7 @@ The live runner can also **pass calls through to an API that runs somewhere else | Pricing | fixed (one price per call) | | Port | 8989 | -Prerequisites (Docker, `uv`, and the not-yet-released `livepeer-gateway` SDK — pinned in `pyproject.toml`) and the shared on-chain/payment setup live in the [repo README](../README.md). The demo upstream additionally needs a **Hugging Face API token** (`HF_TOKEN`, from [huggingface.co → settings → tokens](https://huggingface.co/settings/tokens)) with inference-provider credits. +Prerequisites (Docker, `uv`, and the [`livepeer-gateway` SDK](https://pypi.org/project/livepeer-gateway/)) and the shared on-chain/payment setup live in the [repo README](../README.md). The demo upstream additionally needs a **Hugging Face API token** (`HF_TOKEN`, from [huggingface.co → settings → tokens](https://huggingface.co/settings/tokens)) with inference-provider credits. ## How it's wired diff --git a/api-proxy/pyproject.toml b/api-proxy/pyproject.toml index 0d9bd3e..efa9276 100644 --- a/api-proxy/pyproject.toml +++ b/api-proxy/pyproject.toml @@ -5,9 +5,5 @@ description = "API proxy example app for the Livepeer network." requires-python = ">=3.12" dependencies = [ "aiohttp", - "livepeer-gateway", + "livepeer-gateway>=1.0.0", ] - -# livepeer-gateway is not on PyPI yet; pull it from the branch. -[tool.uv.sources] -livepeer-gateway = { git = "https://github.com/livepeer/livepeer-python-gateway", branch = "main" } diff --git a/compose.onchain.yml b/compose.onchain.yml index de3f6aa..ad19d9f 100644 --- a/compose.onchain.yml +++ b/compose.onchain.yml @@ -14,7 +14,7 @@ services: signer: # Master build, matching the orchestrator; see compose.orchestrator.yml. - image: livepeer/go-livepeer:sha-cc49228 + image: livepeer/go-livepeer:v0.9.1 container_name: example_apps_signer command: - -remoteSigner diff --git a/compose.orchestrator.yml b/compose.orchestrator.yml index 396d5e1..6d88666 100644 --- a/compose.orchestrator.yml +++ b/compose.orchestrator.yml @@ -18,7 +18,7 @@ services: orchestrator: - image: livepeer/go-livepeer:sha-cc49228 + image: livepeer/go-livepeer:v0.9.1 container_name: example_apps_orchestrator # Two distinct addresses: # serviceAddr advertised to external clients in discovery responses, diff --git a/echo/Dockerfile b/echo/Dockerfile index a220b45..ab51de9 100644 --- a/echo/Dockerfile +++ b/echo/Dockerfile @@ -4,14 +4,10 @@ FROM python:3.12-slim # Flush stdout/stderr immediately so output isn't block-buffered in `docker logs`. ENV PYTHONUNBUFFERED=1 -RUN apt-get update \ - && apt-get install -y --no-install-recommends git \ - && rm -rf /var/lib/apt/lists/* - # livepeer-gateway SDK isn't on PyPI yet; install from Git. av (PyAV) ships its # own ffmpeg; opencv-python-headless needs no system GUI libs. RUN pip install --no-cache-dir \ - "livepeer-gateway @ git+https://github.com/livepeer/livepeer-python-gateway@main" \ + "livepeer-gateway>=1.0.0" \ av opencv-python-headless aiohttp WORKDIR /app diff --git a/echo/README.md b/echo/README.md index f138b13..af39c5b 100644 --- a/echo/README.md +++ b/echo/README.md @@ -11,7 +11,7 @@ A realtime video app on the Livepeer network: it receives a live video stream ov | Pricing | hour (metered per second) | | Port | 8989 | -Prerequisites (Docker, `uv`, the not-yet-released SDK) and the shared setup are in the [repo README](../README.md). +Prerequisites (Docker, `uv`, the [SDK](https://pypi.org/project/livepeer-gateway/)) and the shared setup are in the [repo README](../README.md). ## How it's wired @@ -115,7 +115,7 @@ A metered session pays **more than once**. The upfront payment that answers the ## Run without Docker -Start an orchestrator built from go-livepeer `v0.9.0` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly: +Start an orchestrator built from go-livepeer `v0.9.1` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly: ```sh ./livepeer -orchestrator -useLiveRunners -serviceAddr localhost:8935 -orchSecret abcdef -v 6 @@ -123,4 +123,4 @@ uv run runner.py --orchestrator https://localhost:8935 --orchSecret abcdef uv run client.py --mode blur sample.mp4 ``` -The paid path needs a newer orchestrator than the offchain one: metered sessions rely on the session-scoped payment URL added after `v0.9.0` ([#4008](https://github.com/livepeer/go-livepeer/pull/4008)), which is why the compose files pin a master build. +Metered sessions rely on the session-scoped payment URL added in `v0.9.1` ([#4008](https://github.com/livepeer/go-livepeer/pull/4008)), which is the release the compose files pin. diff --git a/echo/pyproject.toml b/echo/pyproject.toml index 80267e7..62a82ba 100644 --- a/echo/pyproject.toml +++ b/echo/pyproject.toml @@ -8,9 +8,5 @@ dependencies = [ "opencv-python-headless", # runner: gray/invert/blur transforms "numpy", # runner: robot ring modulation "aiohttp", - "livepeer-gateway", + "livepeer-gateway>=1.0.0", ] - -# livepeer-gateway is not on PyPI yet; pull it from the branch. -[tool.uv.sources] -livepeer-gateway = { git = "https://github.com/livepeer/livepeer-python-gateway", branch = "main" } diff --git a/hello-world/Dockerfile b/hello-world/Dockerfile index 6907f43..64b9a50 100644 --- a/hello-world/Dockerfile +++ b/hello-world/Dockerfile @@ -4,13 +4,8 @@ FROM python:3.12-slim # Flush stdout/stderr immediately so output isn't block-buffered in `docker logs`. ENV PYTHONUNBUFFERED=1 -RUN apt-get update \ - && apt-get install -y --no-install-recommends git \ - && rm -rf /var/lib/apt/lists/* - -# livepeer-gateway SDK isn't on PyPI yet; install from Git. RUN pip install --no-cache-dir \ - "livepeer-gateway @ git+https://github.com/livepeer/livepeer-python-gateway@main" + "livepeer-gateway>=1.0.0" WORKDIR /app COPY runner.py client.py ./ diff --git a/hello-world/README.md b/hello-world/README.md index 32d0302..dc215b3 100644 --- a/hello-world/README.md +++ b/hello-world/README.md @@ -11,7 +11,7 @@ The smallest possible app on the Livepeer network: a synchronous request/respons | Pricing | fixed (one price per call) | | Port | 8989 | -Prerequisites (Docker, `uv`, and the not-yet-released `livepeer-gateway` SDK — pinned in `pyproject.toml`) and the shared on-chain/payment setup live in the [repo README](../README.md). +Prerequisites (Docker, `uv`, and the [`livepeer-gateway` SDK](https://pypi.org/project/livepeer-gateway/)) and the shared on-chain/payment setup live in the [repo README](../README.md). ## How it's wired @@ -47,7 +47,7 @@ The app registers with a price (`--price` from `.env`, in USD billed once per ca ## Run without Docker -Start an orchestrator built from go-livepeer `v0.9.0` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly: +Start an orchestrator built from go-livepeer `v0.9.1` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly: ```sh ./livepeer -orchestrator -useLiveRunners -serviceAddr localhost:8935 -orchSecret abcdef -v 6 diff --git a/hello-world/pyproject.toml b/hello-world/pyproject.toml index f508ba0..cfd86b2 100644 --- a/hello-world/pyproject.toml +++ b/hello-world/pyproject.toml @@ -4,9 +4,5 @@ version = "0.1.0" description = "Hello-world example app for the Livepeer network." requires-python = ">=3.12" dependencies = [ - "livepeer-gateway", + "livepeer-gateway>=1.0.0", ] - -# livepeer-gateway is not on PyPI yet; pull it from the branch. -[tool.uv.sources] -livepeer-gateway = { git = "https://github.com/livepeer/livepeer-python-gateway", branch = "main" } diff --git a/realtime-transcription/Dockerfile b/realtime-transcription/Dockerfile index 06feaca..9095a00 100644 --- a/realtime-transcription/Dockerfile +++ b/realtime-transcription/Dockerfile @@ -4,17 +4,13 @@ FROM python:3.12-slim # Flush stdout/stderr immediately so output isn't block-buffered in `docker logs`. ENV PYTHONUNBUFFERED=1 -RUN apt-get update \ - && apt-get install -y --no-install-recommends git \ - && rm -rf /var/lib/apt/lists/* - # livepeer-gateway SDK isn't on PyPI yet; install from Git. CTranslate2 (under # faster-whisper) loads cuBLAS/cuDNN from the nvidia wheels, so no CUDA base image # is needed -- the host driver comes in via the compose `deploy` reservation. RUN pip install --no-cache-dir \ faster-whisper numpy \ nvidia-cublas-cu12 nvidia-cudnn-cu12 \ - "livepeer-gateway @ git+https://github.com/livepeer/livepeer-python-gateway@main" + "livepeer-gateway>=1.0.0" ENV LD_LIBRARY_PATH=/usr/local/lib/python3.12/site-packages/nvidia/cublas/lib:/usr/local/lib/python3.12/site-packages/nvidia/cudnn/lib diff --git a/realtime-transcription/README.md b/realtime-transcription/README.md index a240868..6e30a4a 100644 --- a/realtime-transcription/README.md +++ b/realtime-transcription/README.md @@ -11,7 +11,7 @@ Realtime speech-to-text on the Livepeer network over a **WebSocket** — the cli | Transport | WebSocket (`/transcribe`) | | Port | 8989 | -**Requires an NVIDIA GPU.** The model is fixed at `large-v3-turbo`: it swaps large-v3's 32-layer decoder for 4, so it runs far below realtime on a 3090 while staying near large-v3 quality. The device is pinned with it (`cuda`/`float16`) rather than exposed as a flag: on CPU the model loads but falls behind a live stream, which is the one thing this example is about. Prerequisites (Docker, `uv`, the not-yet-released SDK) and the shared on-chain/payment setup are in the [repo README](../README.md). +**Requires an NVIDIA GPU.** The model is fixed at `large-v3-turbo`: it swaps large-v3's 32-layer decoder for 4, so it runs far below realtime on a 3090 while staying near large-v3 quality. The device is pinned with it (`cuda`/`float16`) rather than exposed as a flag: on CPU the model loads but falls behind a live stream, which is the one thing this example is about. Prerequisites (Docker, `uv`, the [SDK](https://pypi.org/project/livepeer-gateway/)) and the shared on-chain/payment setup are in the [repo README](../README.md). ## How it's wired @@ -85,7 +85,7 @@ docker compose -f compose.yml -f compose.onchain.yml down ## Run without Docker -Start an orchestrator built from go-livepeer `v0.9.0` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly (the app needs `faster-whisper` installed): +Start an orchestrator built from go-livepeer `v0.9.1` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly (the app needs `faster-whisper` installed): ```sh ./livepeer -orchestrator -useLiveRunners -serviceAddr localhost:8935 -orchSecret abcdef -v 6 diff --git a/realtime-transcription/pyproject.toml b/realtime-transcription/pyproject.toml index 406540d..9476cdb 100644 --- a/realtime-transcription/pyproject.toml +++ b/realtime-transcription/pyproject.toml @@ -7,9 +7,5 @@ dependencies = [ "faster-whisper", # runner: streaming Whisper ASR "numpy", # runner: PCM buffers + energy VAD "aiohttp", - "livepeer-gateway", + "livepeer-gateway>=1.0.0", ] - -# livepeer-gateway is not on PyPI yet; pull it from the branch. -[tool.uv.sources] -livepeer-gateway = { git = "https://github.com/livepeer/livepeer-python-gateway", branch = "main" } diff --git a/tiles/Dockerfile b/tiles/Dockerfile index 09ffa97..34bcdf3 100644 --- a/tiles/Dockerfile +++ b/tiles/Dockerfile @@ -4,14 +4,9 @@ FROM python:3.12-slim # Flush stdout/stderr immediately so output isn't block-buffered in `docker logs`. ENV PYTHONUNBUFFERED=1 -RUN apt-get update \ - && apt-get install -y --no-install-recommends git \ - && rm -rf /var/lib/apt/lists/* - -# livepeer-gateway SDK isn't on PyPI yet; install from Git. # opencv-python-headless needs no system GUI libs. RUN pip install --no-cache-dir \ - "livepeer-gateway @ git+https://github.com/livepeer/livepeer-python-gateway@main" \ + "livepeer-gateway>=1.0.0" \ opencv-python-headless numpy aiohttp WORKDIR /app diff --git a/tiles/README.md b/tiles/README.md index c67bda8..18dfcc7 100644 --- a/tiles/README.md +++ b/tiles/README.md @@ -11,7 +11,7 @@ An image processor on the Livepeer network that shows what **capacity** does. It | Pricing | fixed (one price per tile call) | | Port | 8989 | -Prerequisites (Docker, `uv`, and the not-yet-released `livepeer-gateway` SDK — pinned in `pyproject.toml`) and the shared on-chain/payment setup live in the [repo README](../README.md). +Prerequisites (Docker, `uv`, and the [`livepeer-gateway` SDK](https://pypi.org/project/livepeer-gateway/)) and the shared on-chain/payment setup live in the [repo README](../README.md). ## How it's wired @@ -63,7 +63,7 @@ Each tile is one paid single-shot call — the orchestrator reserves a session f ## Run without Docker -Start an orchestrator built from go-livepeer `v0.9.0` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly: +Start an orchestrator built from go-livepeer `v0.9.1` or newer (see [Build from source](https://docs.livepeer.org/v1/orchestrators/guides/install-go-livepeer#build-from-source)), then the app and client directly: ```sh ./livepeer -orchestrator -useLiveRunners -serviceAddr localhost:8935 -orchSecret abcdef -v 6 diff --git a/tiles/pyproject.toml b/tiles/pyproject.toml index 8eb1caf..e7ea999 100644 --- a/tiles/pyproject.toml +++ b/tiles/pyproject.toml @@ -7,9 +7,5 @@ dependencies = [ "opencv-python-headless", # runner: stylize tiles; client: split/stitch "numpy", "aiohttp", - "livepeer-gateway", + "livepeer-gateway>=1.0.0", ] - -# livepeer-gateway is not on PyPI yet; pull it from the branch. -[tool.uv.sources] -livepeer-gateway = { git = "https://github.com/livepeer/livepeer-python-gateway", branch = "main" } diff --git a/vllm/README.md b/vllm/README.md index b169fda..88e5ced 100644 --- a/vllm/README.md +++ b/vllm/README.md @@ -11,7 +11,7 @@ Runs an OpenAI-compatible LLM on the Livepeer network and consumes it with the * | Pricing | hour (metered per second of the call) | | Port | 8000 (vLLM), 8080 (gateway) | -**Requires an NVIDIA GPU** for vLLM. The model (`Qwen/Qwen2.5-0.5B-Instruct`) is tiny so it fits a modest card; serving a different one means changing `compose.yml` and `runners.json` together. Prerequisites (Docker, `uv`, the not-yet-released SDK) and the shared on-chain/payment setup are in the [repo README](../README.md). +**Requires an NVIDIA GPU** for vLLM. The model (`Qwen/Qwen2.5-0.5B-Instruct`) is tiny so it fits a modest card; serving a different one means changing `compose.yml` and `runners.json` together. Prerequisites (Docker, `uv`, the [SDK](https://pypi.org/project/livepeer-gateway/)) and the shared on-chain/payment setup are in the [repo README](../README.md). ## How it's wired diff --git a/vllm/pyproject.toml b/vllm/pyproject.toml index e5542ac..f300fce 100644 --- a/vllm/pyproject.toml +++ b/vllm/pyproject.toml @@ -5,10 +5,6 @@ description = "vLLM (OpenAI-compatible LLM) example app for the Livepeer network requires-python = ">=3.12" dependencies = [ "aiohttp", # for gateway.py (the OpenAI -> Livepeer gateway) - "livepeer-gateway", + "livepeer-gateway>=1.0.0", "openai", # for client.py (stock OpenAI library) ] - -# livepeer-gateway is not on PyPI yet; pull it from the branch. -[tool.uv.sources] -livepeer-gateway = { git = "https://github.com/livepeer/livepeer-python-gateway", branch = "main" }