Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
|
Download web_docs/docs/deployment/modal-gpu.md from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 4.19 kB
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_docs/docs/deployment/modal-gpu.md
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/web_docs/docs/deployment/modal-gpu.md
-
curl -L -o modal-gpu.md https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_docs/docs/deployment/modal-gpu.md
4.19 kB
| title: GPU steps on Modal | |
| description: Run speech-to-text and speaker separation on a Modal GPU from GitHub, within Modal's free monthly credit. | |
| # GPU steps on Modal | |
| **What it's for:** the GPU step that turns a meeting recording into a transcript with speakers (WhisperX), without a | |
| local GPU. It runs on Modal, a serverless GPU service whose free Starter plan includes a monthly compute credit, and | |
| starts from GitHub Actions, so it can be run from a phone | |
| ([#314](https://github.com/getcommunityone/open-navigator/issues/314)). | |
| **Runs go to Colab, not here.** On November 17, 2026, the owner decided that diarization runs on the owner's Colab | |
| ([GPU compute decisions](../development/gpu-compute-decisions.md)). Use [GPU speakers on Colab](colab-gpu-diarize.md). | |
| This workflow and its code are kept but not used for runs. | |
| <details> | |
| <summary><b>Set it up from a phone (about 10 minutes)</b></summary> | |
| 1. **Modal account:** sign up at [modal.com](https://modal.com). The free Starter plan gives a monthly credit (larger | |
| with a payment method on file). Without a card, work stops when the credit runs out, which caps spending at zero. | |
| With a card, use past the credit is billed, so watch the dashboard or keep runs small. | |
| 2. **Modal token:** modal.com β **Settings** β **API tokens** β **New token**. Copy the token ID and secret. | |
| 3. **GitHub secrets:** repository **Settings** β **Environments** β `dev` β add `MODAL_TOKEN_ID` and | |
| `MODAL_TOKEN_SECRET`. Never paste them anywhere else. | |
| 4. **Hugging Face token for the speaker models:** signed in on huggingface.co, open | |
| [pyannote/speaker-diarization-community-1](https://huggingface.co/pyannote/speaker-diarization-community-1) and | |
| accept its conditions (current WhisperX uses it; with only the older model accepted, speakers come back empty). For | |
| older WhisperX versions, also accept [speaker-diarization-3.1](https://huggingface.co/pyannote/speaker-diarization-3.1) | |
| and [segmentation-3.0](https://huggingface.co/pyannote/segmentation-3.0). Then make a **read** token with the same | |
| account ([settings/tokens](https://huggingface.co/settings/tokens)). Add it as a third GitHub secret, `HF_TOKEN`; | |
| each run copies it into the Modal secret `huggingface`. (Or make that secret yourself in Modal β **Secrets** β | |
| **Create new secret** β **Custom**, key `HF_TOKEN`.) | |
| 5. **Run it:** GitHub β **Actions** β **GPU diarization on Modal** β **Run workflow**, with the items to process. | |
| </details> | |
| <details> | |
| <summary><b>What to give it</b></summary> | |
| - A path in the Modal volume `open-navigator-audio`, e.g. `meetings/2026-11-03.opus`. Put files there from a laptop: | |
| `modal volume put open-navigator-audio <file> meetings/<file>`. | |
| - Or a direct link to a media file a city publishes (not YouTube: YouTube blocks cloud servers, see | |
| `packages/scrapers/src/scrapers/youtube/BYPASS_IP_BLOCK.md`). | |
| Each run takes at most `limit` items (default 3), so one run can't use the month's credit. | |
| </details> | |
| <details> | |
| <summary><b>What comes back, and what it costs</b></summary> | |
| The run's artifact holds `<name>.diarized.json` per item (segments with start, end, speaker and text) and | |
| `usage.jsonl`: one row per item with the GPU, seconds, GPU-hours and an **estimated** cost. The estimate is GPU time at | |
| Modal's published rate (T4 $0.000164 a second, as reported on 2026-11-14); CPU and memory are billed on top, so the | |
| invoice is a little higher. Modal's dashboard shows the real spend. | |
| Not run yet: the first real run checks that the pinned WhisperX version still exposes the diarization pipeline the | |
| code calls (`llm.gemini.diarize_postprocess`). | |
| </details> | |
| <details> | |
| <summary><b>Credentials</b></summary> | |
| | Credential | Where it's made | Scope | Goes to | Lifetime | | |
| |---|---|---|---|---| | |
| | Modal API token | modal.com β Settings β API tokens | the Modal workspace | GitHub environment `dev`: `MODAL_TOKEN_ID`, `MODAL_TOKEN_SECRET` | until revoked; revoke if unused | | |
| | Hugging Face read token | huggingface.co β Settings β Access tokens | read, gated models accepted | GitHub environment `dev`: `HF_TOKEN`, copied each run into Modal secret `huggingface` | 90 days | | |
| </details> | |