diff options
| author | Danilo M. <danix@danix.xyz> | 2026-05-12 11:32:46 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-05-12 11:32:46 +0200 |
| commit | 86af08a80d9fbfdcde71f80cd0bebd5034ab8a3b (patch) | |
| tree | 31464907358dbdb8c20e3878604a86624d3c3a31 /README.md | |
| parent | 5f0710065f3696d83163909192208b3324439fbd (diff) | |
| download | ollama-runpod-86af08a80d9fbfdcde71f80cd0bebd5034ab8a3b.tar.gz ollama-runpod-86af08a80d9fbfdcde71f80cd0bebd5034ab8a3b.zip | |
Add patch_external_configs() to update OLLAMA_HOST in transart.py and
ollama_host in my-publisher/config.toml with the live pod URL on each
session start. Paths are configurable via TRANSART_SCRIPT and
PUBLISHER_CONFIG in config; skipped when empty or file missing.
Also replace hardcoded danixland-storage default with generic my-storage,
add .gitignore, and update README/CLAUDE.md to document the new behavior.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -56,6 +56,10 @@ CONTAINER_DISK_GB=15 GPU_COUNT=1 STARTUP_TIMEOUT=240 # seconds to wait for Ollama to become reachable WARMUP_NUM_CTX=32768 # context size used when pre-loading models into VRAM + +# External tool configs to patch with the live pod URL (leave empty to skip) +TRANSART_SCRIPT="" # e.g. /home/user/bin/transart.py +PUBLISHER_CONFIG="" # e.g. /home/user/.config/my-publisher/config.toml ``` ## Usage @@ -109,12 +113,14 @@ runpod-session.sh --new --gpu-type "RTX 4090" --max-price 1.80 4. **Startup wait** — polls `https://<pod-id>-11434.proxy.runpod.net/api/tags` every 5 seconds until Ollama responds (up to `STARTUP_TIMEOUT` seconds). -5. **opencode.jsonc patch** — updates three fields in your opencode config: +5. **Config patching** — updates your opencode config and any external tools configured via `TRANSART_SCRIPT` / `PUBLISHER_CONFIG`: - `provider.runpod.options.baseURL` → the live pod URL - `model` → `runpod/<DEFAULT_MODEL>` - `provider.runpod.models` → merges all `WARMUP_MODELS` in (existing per-model settings are preserved via jq recursive merge) + - `OLLAMA_HOST` in `transart.py` → bare pod URL (no `/v1`) + - `ollama_host` in `my-publisher/config.toml` → bare pod URL (no `/v1`) - A `.bak` copy is written before any changes. + A `.bak` copy is written before each file is modified. Entries left empty in config are skipped. 6. **Model warmup** — sends a short generation request to load the model into VRAM at `WARMUP_NUM_CTX` context length, so the first real request isn't slow. @@ -146,6 +152,8 @@ Your `~/.config/opencode/opencode.jsonc` needs a `runpod` provider block before | `~/.config/runpod-session/state.json` | Last session record | | `~/.config/opencode/opencode.jsonc` | Patched on each session start | | `~/.config/opencode/opencode.jsonc.bak` | Backup written before each patch | +| `$TRANSART_SCRIPT` | `OLLAMA_HOST` updated if set in config | +| `$PUBLISHER_CONFIG` | `ollama_host` updated if set in config | ## Cost notes |
