runpod-llm-starter 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runpod_llm_starter-0.1.0/CHANGELOG.md +30 -0
- runpod_llm_starter-0.1.0/LICENSE +21 -0
- runpod_llm_starter-0.1.0/MANIFEST.in +6 -0
- runpod_llm_starter-0.1.0/PKG-INFO +153 -0
- runpod_llm_starter-0.1.0/README.md +127 -0
- runpod_llm_starter-0.1.0/docs/PROTOCOL.md +55 -0
- runpod_llm_starter-0.1.0/docs/architecture.md +80 -0
- runpod_llm_starter-0.1.0/docs/architecture.svg +104 -0
- runpod_llm_starter-0.1.0/docs/screenshots/chat_empty.png +0 -0
- runpod_llm_starter-0.1.0/docs/screenshots/credentials.png +0 -0
- runpod_llm_starter-0.1.0/docs/screenshots/deploy_model.png +0 -0
- runpod_llm_starter-0.1.0/docs/screenshots/deploy_ready.png +0 -0
- runpod_llm_starter-0.1.0/docs/screenshots/home.png +0 -0
- runpod_llm_starter-0.1.0/docs/screenshots/pods.png +0 -0
- runpod_llm_starter-0.1.0/image/.dockerignore +3 -0
- runpod_llm_starter-0.1.0/image/Dockerfile +25 -0
- runpod_llm_starter-0.1.0/image/README.md +122 -0
- runpod_llm_starter-0.1.0/image/entrypoint.sh +407 -0
- runpod_llm_starter-0.1.0/llmstarter/__init__.py +6 -0
- runpod_llm_starter-0.1.0/llmstarter/__main__.py +33 -0
- runpod_llm_starter-0.1.0/llmstarter/assets/check.svg +1 -0
- runpod_llm_starter-0.1.0/llmstarter/assets/dot.svg +1 -0
- runpod_llm_starter-0.1.0/llmstarter/assets/icon.svg +18 -0
- runpod_llm_starter-0.1.0/llmstarter/catalog.py +65 -0
- runpod_llm_starter-0.1.0/llmstarter/creds.py +188 -0
- runpod_llm_starter-0.1.0/llmstarter/deploy.py +345 -0
- runpod_llm_starter-0.1.0/llmstarter/journal.py +69 -0
- runpod_llm_starter-0.1.0/llmstarter/keyring_exec.py +30 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/__init__.py +1 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/about.py +123 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/autostop.py +84 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/chat.py +480 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/context.py +372 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/credentials.py +522 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/deploy_page.py +808 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/format.py +167 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/home.py +73 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/icons.py +104 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/mainwindow.py +297 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/pods.py +347 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/progress.py +478 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/settings_dialog.py +50 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/tailnet.py +194 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/tasks.py +91 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/theme.py +290 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/widgets.py +528 -0
- runpod_llm_starter-0.1.0/llmstarter/ui/workerclient.py +118 -0
- runpod_llm_starter-0.1.0/llmstarter/worker.py +303 -0
- runpod_llm_starter-0.1.0/pyproject.toml +48 -0
- runpod_llm_starter-0.1.0/runpod_llm_starter.egg-info/PKG-INFO +153 -0
- runpod_llm_starter-0.1.0/runpod_llm_starter.egg-info/SOURCES.txt +69 -0
- runpod_llm_starter-0.1.0/runpod_llm_starter.egg-info/dependency_links.txt +1 -0
- runpod_llm_starter-0.1.0/runpod_llm_starter.egg-info/entry_points.txt +2 -0
- runpod_llm_starter-0.1.0/runpod_llm_starter.egg-info/requires.txt +4 -0
- runpod_llm_starter-0.1.0/runpod_llm_starter.egg-info/top_level.txt +1 -0
- runpod_llm_starter-0.1.0/scripts/e2e.py +107 -0
- runpod_llm_starter-0.1.0/scripts/gui_e2e.py +320 -0
- runpod_llm_starter-0.1.0/setup.cfg +4 -0
- runpod_llm_starter-0.1.0/tests/fake_worker.py +94 -0
- runpod_llm_starter-0.1.0/tests/shoot_ui.py +124 -0
- runpod_llm_starter-0.1.0/tests/support.py +164 -0
- runpod_llm_starter-0.1.0/tests/test_backend.py +634 -0
- runpod_llm_starter-0.1.0/tests/test_chat.py +111 -0
- runpod_llm_starter-0.1.0/tests/test_credentials.py +99 -0
- runpod_llm_starter-0.1.0/tests/test_deploy_page.py +99 -0
- runpod_llm_starter-0.1.0/tests/test_helpers.py +136 -0
- runpod_llm_starter-0.1.0/tests/test_mainwindow.py +80 -0
- runpod_llm_starter-0.1.0/tests/test_pods.py +147 -0
- runpod_llm_starter-0.1.0/tests/test_progress.py +118 -0
- runpod_llm_starter-0.1.0/tests/test_screenshots.py +35 -0
- runpod_llm_starter-0.1.0/tests/test_workerclient.py +93 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-12-02
|
|
10
|
+
|
|
11
|
+
First public release.
|
|
12
|
+
|
|
13
|
+
- **Console** (`llmstarter`, PySide6): Deploy LLM on RunPod, Credentials, My Pods, Chat, Tailnet and
|
|
14
|
+
About, with dark and light themes.
|
|
15
|
+
- **Deploy flow:** a curated Ollama model list or any tag; the cheapest in-stock GPUs that fit, with live
|
|
16
|
+
prices; a single-use Tailscale key, revoked as soon as the pod joins; model download and warm-up
|
|
17
|
+
before Ready; cancel at any step.
|
|
18
|
+
- **Money safety:** an unknown create outcome is never retried; a failed or cancelled deploy terminates
|
|
19
|
+
its pod and removes its tailnet device; a deploy journal flags pods left behind by a killed console;
|
|
20
|
+
the worker cleans up on SIGTERM, SIGHUP and SIGINT.
|
|
21
|
+
- **Credentials:** the GUI never holds a key. A worker process gets them from
|
|
22
|
+
[cred-broker](https://github.com/kcherry497/cred-broker), the OS keyring or the environment.
|
|
23
|
+
- **Demo image** `docker.io/kcherry/llm-starter-ollama:0.1.1`: Ollama on loopback plus Tailscale in
|
|
24
|
+
userspace mode; the auth key never appears in argv and is removed from the container's main process
|
|
25
|
+
environment. Image 0.1.1 also removes it when no in-memory key file can be written, where 0.1.0
|
|
26
|
+
kept it in that process's environment.
|
|
27
|
+
- **Live tests** (`scripts/e2e.py`, `scripts/gui_e2e.py`): deploy, chat and terminate a real pod through
|
|
28
|
+
the worker protocol or by clicking through the GUI. They bill, so they need `LLMSTARTER_E2E_BILLS=1`.
|
|
29
|
+
- Built on [runpodkit](https://github.com/kcherry497/runpod-kit) 0.3 and
|
|
30
|
+
[tailscalekit](https://github.com/kcherry497/tailscale-kit) 0.1.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kevin Cherry
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: runpod-llm-starter
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Deploy a private LLM on RunPod and manage it from a desktop console.
|
|
5
|
+
Author: Kevin Cherry
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kcherry497/runpod-llm-starter
|
|
8
|
+
Project-URL: Issues, https://github.com/kcherry497/runpod-llm-starter/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/kcherry497/runpod-llm-starter/blob/main/CHANGELOG.md
|
|
10
|
+
Keywords: runpod,tailscale,ollama,llm,gpu,pyside6
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: X11 Applications :: Qt
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: PySide6-Essentials>=6.6
|
|
22
|
+
Requires-Dist: keyring>=24
|
|
23
|
+
Requires-Dist: runpodkit>=0.3
|
|
24
|
+
Requires-Dist: tailscalekit>=0.1
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<img src="https://raw.githubusercontent.com/kcherry497/runpod-llm-starter/main/docs/screenshots/home.png" alt="The LLM Starter console" width="100%">
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
<h1 align="center">LLM Starter: your own model on RunPod, reachable only by you</h1>
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<img src="https://img.shields.io/badge/python-3.10%2B-3776AB?logo=python&logoColor=white" alt="Python 3.10+">
|
|
35
|
+
<img src="https://img.shields.io/badge/Qt-PySide6-41CD52?logo=qt&logoColor=white" alt="PySide6">
|
|
36
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
|
|
37
|
+
<a href="https://pypi.org/project/runpod-llm-starter/"><img src="https://img.shields.io/pypi/v/runpod-llm-starter" alt="PyPI"></a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
A desktop console that takes you from nothing to chatting with an open model on a rented GPU, in a
|
|
41
|
+
few clicks, without exposing the model to the internet or pasting API keys into an app.
|
|
42
|
+
|
|
43
|
+
1. **Connect your accounts once.** RunPod and Tailscale (Docker optional). Keys are stored on your
|
|
44
|
+
computer only, encrypted with [cred-broker](https://github.com/kcherry497/cred-broker) or your OS
|
|
45
|
+
keyring. A separate worker process uses them; the console never stores, shows or logs them.
|
|
46
|
+
2. **Pick a model.** A curated list of [Ollama](https://ollama.com/library) models, or any tag you like.
|
|
47
|
+
The console shows how much VRAM it needs and the cheapest GPUs in stock that fit, with live prices.
|
|
48
|
+
3. **Deploy.** The pod joins your private [Tailscale](https://tailscale.com/) network with a
|
|
49
|
+
single-use key that is revoked the moment it has joined. Ollama listens on the pod's loopback
|
|
50
|
+
only; no port is opened to the internet.
|
|
51
|
+
4. **Chat.** Straight from the console, or point any Ollama client at the URL it shows you.
|
|
52
|
+
5. **Stop paying.** My Pods shows what's running and what it costs; terminate cleans up the pod and
|
|
53
|
+
its tailnet device. Optional auto-stop catches the pod you forgot.
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
## Quick start
|
|
58
|
+
|
|
59
|
+
You need accounts at **RunPod** (with credit) and **Tailscale** (free), with Tailscale installed and
|
|
60
|
+
signed in on this computer.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pipx install runpod-llm-starter
|
|
64
|
+
llmstarter
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
On Linux, Qt needs a few system libraries that most desktops already have (on a bare Debian or
|
|
68
|
+
Ubuntu: `sudo apt install libegl1 libxkbcommon0 libfontconfig1`).
|
|
69
|
+
|
|
70
|
+
Then, in the console:
|
|
71
|
+
|
|
72
|
+
1. **Credentials.** Choose cred-broker (recommended if an AI agent works on this machine) or the OS
|
|
73
|
+
keyring, and add a [RunPod API key](https://www.runpod.io/console/user/settings) and a
|
|
74
|
+
[Tailscale API key](https://login.tailscale.com/admin/settings/keys).
|
|
75
|
+
2. **Deploy LLM on RunPod.** Start with *Qwen 2.5 0.5B*: it costs a few cents to try the whole chain.
|
|
76
|
+
3. **Chat now.**
|
|
77
|
+
|
|
78
|
+
> [!IMPORTANT]
|
|
79
|
+
> **Lock down your tailnet first.** Ollama has no authentication. Tailscale's default policy lets
|
|
80
|
+
> every device reach every other device, and the console warns you when yours still does. Add this to
|
|
81
|
+
> your [tailnet policy](https://login.tailscale.com/admin/acls):
|
|
82
|
+
>
|
|
83
|
+
> ```jsonc
|
|
84
|
+
> "tagOwners": { "tag:llm-starter": ["autogroup:admin"] },
|
|
85
|
+
> "grants": [ { "src": ["autogroup:member"], "dst": ["tag:llm-starter"], "ip": ["tcp:11434"] } ]
|
|
86
|
+
> ```
|
|
87
|
+
>
|
|
88
|
+
> Allow rules add up: this grant isolates the pod **only once you remove or narrow the broad
|
|
89
|
+
> allow-all rule** (`"src": ["*"], "dst": ["*"]` in the default policy). Then your devices can reach
|
|
90
|
+
> the model on port 11434 and the pod can reach nothing of yours. With the tag owned, deploys also
|
|
91
|
+
> survive stop/start; without it, the console falls back to ephemeral nodes and warns you.
|
|
92
|
+
|
|
93
|
+
## What's in the box
|
|
94
|
+
|
|
95
|
+
| Piece | What it is | Reuse it on its own |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| Console (`llmstarter`) | PySide6 app: Deploy, Credentials, My Pods, Chat, Tailnet | `pipx install …`, then `llmstarter` |
|
|
98
|
+
| Worker (`llmstarter.worker`) | The process that holds keys and does the work; JSON lines ([protocol](docs/PROTOCOL.md)) | drive it from any language |
|
|
99
|
+
| [`image/`](image/) | `llm-starter-ollama`: Ollama + Tailscale, loopback-only, key never in env or argv | any RunPod pod or container host |
|
|
100
|
+
| [runpodkit](https://github.com/kcherry497/runpod-kit) | RunPod control: GPU prices, money-safe create, stale-port-safe SSH | `pipx install runpodkit` |
|
|
101
|
+
| [tailscalekit](https://github.com/kcherry497/tailscale-kit) | Tailscale control: single-use keys, device cleanup, policy check | `pip install tailscalekit` |
|
|
102
|
+
| [cred-broker](https://github.com/kcherry497/cred-broker) | Let a program (or an AI agent) use a key without ever seeing it | standalone |
|
|
103
|
+
|
|
104
|
+
## Security model
|
|
105
|
+
|
|
106
|
+
- **The console never holds a key.** With cred-broker it never sees one at all; with the OS keyring
|
|
107
|
+
it hands what you paste straight to the keyring. It launches a worker under `cred exec` (or a keyring shim) and
|
|
108
|
+
talks to it over JSON; every line the worker writes is redacted.
|
|
109
|
+
- **The pod gets one single-use Tailscale auth key**, which the image hands to Tailscale
|
|
110
|
+
through a private file (never the command line) and removes from its environment before Ollama
|
|
111
|
+
starts. The console revokes it as soon as the pod has joined.
|
|
112
|
+
- **No public ports** (in the default Tailscale mode; the optional RunPod-proxy mode is
|
|
113
|
+
unauthenticated and for quick tests only). Ollama binds `127.0.0.1` in the pod; Tailscale delivers your traffic to it.
|
|
114
|
+
You reach it at the pod's IPv6 tailnet address (`http://[fd7a:…]:11434`), which Ollama's
|
|
115
|
+
DNS-rebinding guard accepts (it refuses `100.x` Host headers on a loopback bind).
|
|
116
|
+
- **Money safety.** A create that times out is never retried (it may have made a pod); a failed or
|
|
117
|
+
cancelled deploy terminates what it created; a deploy journal flags pods left behind if the console
|
|
118
|
+
was killed mid-deploy; stopped pods are flagged because their volume still bills. Auto-stop stops
|
|
119
|
+
compute only, and only while the console is running: terminate to stop all billing.
|
|
120
|
+
|
|
121
|
+
More in [docs/architecture.md](docs/architecture.md).
|
|
122
|
+
|
|
123
|
+
## Troubleshooting
|
|
124
|
+
|
|
125
|
+
| Symptom | What to do |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| "No GPU of the chosen types was available" | RunPod is out of that GPU right now. Go back to the GPU step and pick another, or try later. |
|
|
128
|
+
| The first deploy sits on "Waiting for the pod to start" | The pod is pulling the image (about 9 GB). Measured: about 2 minutes cold, under 30 s cached. The console gives up after 30 minutes and cleans up. |
|
|
129
|
+
| "tag:llm-starter is not owned" warning | Add the `tagOwners` line above. Until then the pod joins as an ephemeral node and leaves the tailnet when stopped. |
|
|
130
|
+
| `403` from `http://100.x.y.z:11434` | Use the IPv6 URL the console shows (`http://[fd7a:…]:11434`). Ollama's DNS-rebinding guard refuses `100.x` Host headers on a loopback bind. |
|
|
131
|
+
| A red banner in My Pods about a leftover pod | A deploy was interrupted (the console was killed or the machine slept). Terminate the pod from the banner. |
|
|
132
|
+
| A stopped pod still costs money | Its volume bills while it exists. Terminate it when you're done. |
|
|
133
|
+
|
|
134
|
+
## Development
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
python3 -m venv .venv && .venv/bin/pip install -e .
|
|
138
|
+
QT_QPA_PLATFORM=offscreen .venv/bin/python -m unittest discover -s tests -v
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Two live tests deploy a real pod on the cheapest fitting GPU, chat with it, and terminate it. They **bill
|
|
142
|
+
your RunPod account** (a few cents) and refuse to run without `LLMSTARTER_E2E_BILLS=1`. Both read
|
|
143
|
+
`RUNPOD_API_KEY` and `TS_API_KEY` from the environment.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
LLMSTARTER_E2E_BILLS=1 .venv/bin/python scripts/e2e.py # through the worker protocol
|
|
147
|
+
LLMSTARTER_E2E_BILLS=1 .venv/bin/python scripts/gui_e2e.py /tmp/shots # clicks through the real GUI
|
|
148
|
+
GUI_E2E_DRY=1 .venv/bin/python scripts/gui_e2e.py /tmp/shots # free rehearsal: cancels at billing
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT. Not affiliated with or endorsed by RunPod, Tailscale or Ollama.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/kcherry497/runpod-llm-starter/main/docs/screenshots/home.png" alt="The LLM Starter console" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">LLM Starter: your own model on RunPod, reachable only by you</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="https://img.shields.io/badge/python-3.10%2B-3776AB?logo=python&logoColor=white" alt="Python 3.10+">
|
|
9
|
+
<img src="https://img.shields.io/badge/Qt-PySide6-41CD52?logo=qt&logoColor=white" alt="PySide6">
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
|
|
11
|
+
<a href="https://pypi.org/project/runpod-llm-starter/"><img src="https://img.shields.io/pypi/v/runpod-llm-starter" alt="PyPI"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
A desktop console that takes you from nothing to chatting with an open model on a rented GPU, in a
|
|
15
|
+
few clicks, without exposing the model to the internet or pasting API keys into an app.
|
|
16
|
+
|
|
17
|
+
1. **Connect your accounts once.** RunPod and Tailscale (Docker optional). Keys are stored on your
|
|
18
|
+
computer only, encrypted with [cred-broker](https://github.com/kcherry497/cred-broker) or your OS
|
|
19
|
+
keyring. A separate worker process uses them; the console never stores, shows or logs them.
|
|
20
|
+
2. **Pick a model.** A curated list of [Ollama](https://ollama.com/library) models, or any tag you like.
|
|
21
|
+
The console shows how much VRAM it needs and the cheapest GPUs in stock that fit, with live prices.
|
|
22
|
+
3. **Deploy.** The pod joins your private [Tailscale](https://tailscale.com/) network with a
|
|
23
|
+
single-use key that is revoked the moment it has joined. Ollama listens on the pod's loopback
|
|
24
|
+
only; no port is opened to the internet.
|
|
25
|
+
4. **Chat.** Straight from the console, or point any Ollama client at the URL it shows you.
|
|
26
|
+
5. **Stop paying.** My Pods shows what's running and what it costs; terminate cleans up the pod and
|
|
27
|
+
its tailnet device. Optional auto-stop catches the pod you forgot.
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
## Quick start
|
|
32
|
+
|
|
33
|
+
You need accounts at **RunPod** (with credit) and **Tailscale** (free), with Tailscale installed and
|
|
34
|
+
signed in on this computer.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pipx install runpod-llm-starter
|
|
38
|
+
llmstarter
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
On Linux, Qt needs a few system libraries that most desktops already have (on a bare Debian or
|
|
42
|
+
Ubuntu: `sudo apt install libegl1 libxkbcommon0 libfontconfig1`).
|
|
43
|
+
|
|
44
|
+
Then, in the console:
|
|
45
|
+
|
|
46
|
+
1. **Credentials.** Choose cred-broker (recommended if an AI agent works on this machine) or the OS
|
|
47
|
+
keyring, and add a [RunPod API key](https://www.runpod.io/console/user/settings) and a
|
|
48
|
+
[Tailscale API key](https://login.tailscale.com/admin/settings/keys).
|
|
49
|
+
2. **Deploy LLM on RunPod.** Start with *Qwen 2.5 0.5B*: it costs a few cents to try the whole chain.
|
|
50
|
+
3. **Chat now.**
|
|
51
|
+
|
|
52
|
+
> [!IMPORTANT]
|
|
53
|
+
> **Lock down your tailnet first.** Ollama has no authentication. Tailscale's default policy lets
|
|
54
|
+
> every device reach every other device, and the console warns you when yours still does. Add this to
|
|
55
|
+
> your [tailnet policy](https://login.tailscale.com/admin/acls):
|
|
56
|
+
>
|
|
57
|
+
> ```jsonc
|
|
58
|
+
> "tagOwners": { "tag:llm-starter": ["autogroup:admin"] },
|
|
59
|
+
> "grants": [ { "src": ["autogroup:member"], "dst": ["tag:llm-starter"], "ip": ["tcp:11434"] } ]
|
|
60
|
+
> ```
|
|
61
|
+
>
|
|
62
|
+
> Allow rules add up: this grant isolates the pod **only once you remove or narrow the broad
|
|
63
|
+
> allow-all rule** (`"src": ["*"], "dst": ["*"]` in the default policy). Then your devices can reach
|
|
64
|
+
> the model on port 11434 and the pod can reach nothing of yours. With the tag owned, deploys also
|
|
65
|
+
> survive stop/start; without it, the console falls back to ephemeral nodes and warns you.
|
|
66
|
+
|
|
67
|
+
## What's in the box
|
|
68
|
+
|
|
69
|
+
| Piece | What it is | Reuse it on its own |
|
|
70
|
+
| --- | --- | --- |
|
|
71
|
+
| Console (`llmstarter`) | PySide6 app: Deploy, Credentials, My Pods, Chat, Tailnet | `pipx install …`, then `llmstarter` |
|
|
72
|
+
| Worker (`llmstarter.worker`) | The process that holds keys and does the work; JSON lines ([protocol](docs/PROTOCOL.md)) | drive it from any language |
|
|
73
|
+
| [`image/`](image/) | `llm-starter-ollama`: Ollama + Tailscale, loopback-only, key never in env or argv | any RunPod pod or container host |
|
|
74
|
+
| [runpodkit](https://github.com/kcherry497/runpod-kit) | RunPod control: GPU prices, money-safe create, stale-port-safe SSH | `pipx install runpodkit` |
|
|
75
|
+
| [tailscalekit](https://github.com/kcherry497/tailscale-kit) | Tailscale control: single-use keys, device cleanup, policy check | `pip install tailscalekit` |
|
|
76
|
+
| [cred-broker](https://github.com/kcherry497/cred-broker) | Let a program (or an AI agent) use a key without ever seeing it | standalone |
|
|
77
|
+
|
|
78
|
+
## Security model
|
|
79
|
+
|
|
80
|
+
- **The console never holds a key.** With cred-broker it never sees one at all; with the OS keyring
|
|
81
|
+
it hands what you paste straight to the keyring. It launches a worker under `cred exec` (or a keyring shim) and
|
|
82
|
+
talks to it over JSON; every line the worker writes is redacted.
|
|
83
|
+
- **The pod gets one single-use Tailscale auth key**, which the image hands to Tailscale
|
|
84
|
+
through a private file (never the command line) and removes from its environment before Ollama
|
|
85
|
+
starts. The console revokes it as soon as the pod has joined.
|
|
86
|
+
- **No public ports** (in the default Tailscale mode; the optional RunPod-proxy mode is
|
|
87
|
+
unauthenticated and for quick tests only). Ollama binds `127.0.0.1` in the pod; Tailscale delivers your traffic to it.
|
|
88
|
+
You reach it at the pod's IPv6 tailnet address (`http://[fd7a:…]:11434`), which Ollama's
|
|
89
|
+
DNS-rebinding guard accepts (it refuses `100.x` Host headers on a loopback bind).
|
|
90
|
+
- **Money safety.** A create that times out is never retried (it may have made a pod); a failed or
|
|
91
|
+
cancelled deploy terminates what it created; a deploy journal flags pods left behind if the console
|
|
92
|
+
was killed mid-deploy; stopped pods are flagged because their volume still bills. Auto-stop stops
|
|
93
|
+
compute only, and only while the console is running: terminate to stop all billing.
|
|
94
|
+
|
|
95
|
+
More in [docs/architecture.md](docs/architecture.md).
|
|
96
|
+
|
|
97
|
+
## Troubleshooting
|
|
98
|
+
|
|
99
|
+
| Symptom | What to do |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| "No GPU of the chosen types was available" | RunPod is out of that GPU right now. Go back to the GPU step and pick another, or try later. |
|
|
102
|
+
| The first deploy sits on "Waiting for the pod to start" | The pod is pulling the image (about 9 GB). Measured: about 2 minutes cold, under 30 s cached. The console gives up after 30 minutes and cleans up. |
|
|
103
|
+
| "tag:llm-starter is not owned" warning | Add the `tagOwners` line above. Until then the pod joins as an ephemeral node and leaves the tailnet when stopped. |
|
|
104
|
+
| `403` from `http://100.x.y.z:11434` | Use the IPv6 URL the console shows (`http://[fd7a:…]:11434`). Ollama's DNS-rebinding guard refuses `100.x` Host headers on a loopback bind. |
|
|
105
|
+
| A red banner in My Pods about a leftover pod | A deploy was interrupted (the console was killed or the machine slept). Terminate the pod from the banner. |
|
|
106
|
+
| A stopped pod still costs money | Its volume bills while it exists. Terminate it when you're done. |
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
python3 -m venv .venv && .venv/bin/pip install -e .
|
|
112
|
+
QT_QPA_PLATFORM=offscreen .venv/bin/python -m unittest discover -s tests -v
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Two live tests deploy a real pod on the cheapest fitting GPU, chat with it, and terminate it. They **bill
|
|
116
|
+
your RunPod account** (a few cents) and refuse to run without `LLMSTARTER_E2E_BILLS=1`. Both read
|
|
117
|
+
`RUNPOD_API_KEY` and `TS_API_KEY` from the environment.
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
LLMSTARTER_E2E_BILLS=1 .venv/bin/python scripts/e2e.py # through the worker protocol
|
|
121
|
+
LLMSTARTER_E2E_BILLS=1 .venv/bin/python scripts/gui_e2e.py /tmp/shots # clicks through the real GUI
|
|
122
|
+
GUI_E2E_DRY=1 .venv/bin/python scripts/gui_e2e.py /tmp/shots # free rehearsal: cancels at billing
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT. Not affiliated with or endorsed by RunPod, Tailscale or Ollama.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Worker protocol
|
|
2
|
+
|
|
3
|
+
The console GUI never holds a credential. It starts `llmstarter.worker` under a credential
|
|
4
|
+
backend (`cred exec …` or the keyring shim; see `llmstarter/creds.py: worker_command()`) and
|
|
5
|
+
talks newline-delimited JSON over stdin/stdout. `llmstarter/ui/workerclient.py` (`WorkerClient`)
|
|
6
|
+
wraps this for Qt.
|
|
7
|
+
|
|
8
|
+
## Messages
|
|
9
|
+
|
|
10
|
+
| Direction | Shape |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| GUI → worker | `{"id": 7, "method": "plan", "params": {...}}` |
|
|
13
|
+
| worker → GUI (reply) | `{"id": 7, "ok": true, "result": …}` or `{"id": 7, "ok": false, "error": {"message": str, "kind": "error"\|"auth"\|"capacity"\|"unknown_outcome"\|"cancelled"\|"worker", …}}` |
|
|
14
|
+
| worker → GUI (progress) | `{"event": "deploy", "id": <deploy request id>, "data": {"step", "status", "message", …}}` |
|
|
15
|
+
| worker → GUI (startup) | `{"event": "hello", "id": 0, "data": {"version", "image", "runpod": bool, "tailscale": bool}}` |
|
|
16
|
+
|
|
17
|
+
Requests run concurrently; replies can arrive in any order. Every line is passed through secret
|
|
18
|
+
redaction before it is written.
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
| Method | Params | Result |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| `ping` | – | `{"version", "image", "runpod": bool, "tailscale": bool}` (which credentials are present) |
|
|
25
|
+
| `check_credentials` | – | `{"runpod": {"ok", "detail"}, "tailscale": {"ok", "detail"}}` (live API calls) |
|
|
26
|
+
| `models` | – | curated list: `[{"tag", "name", "size_gb", "min_vram_gb", "note"}]` |
|
|
27
|
+
| `gpu_types` | `{"secure_cloud": true, "min_vram": 0}` | `[{"id", "displayName", "memoryInGb", "price", "stockStatus", …}]`, cheapest first |
|
|
28
|
+
| `plan` | `{"model": "qwen3:8b"}` | `{"model": {...}, "gpus": [up to 4 in-stock fits], "volume_gb", "container_disk_gb", "price_per_hr"}` |
|
|
29
|
+
| `policy_check` | – | `{"default_allow": bool}` |
|
|
30
|
+
| `deploy` | `{"model", "gpu_ids": [...], "volume_gb", "container_disk_gb", "tailscale": true, "tag": "tag:llm-starter"}` | `{"pod_id", "hostname", "url", "model", "gpu", "price_per_hr", "ip4", "ip6", "tagged"}`; emits progress events |
|
|
31
|
+
| `cancel` | `{"deploy_id": <deploy request id>}` | `{"cancelled": bool}` |
|
|
32
|
+
| `orphans` | – | pods a deploy created whose process died before finishing (from the deploy journal), still existing: `[{"pod_id", "hostname", "state", "cost", "created_ts"}]` |
|
|
33
|
+
| `list_pods` | – | non-terminated pods (no `env`), plus `"state"` and `"starter": bool` |
|
|
34
|
+
| `pod_action` | `{"pod_id", "action": "start"\|"stop"}` | `{"state"}` |
|
|
35
|
+
| `terminate` | `{"pod_id", "hostname"}` | `{"terminate": status, "device": status\|"none"}` |
|
|
36
|
+
| `list_devices` | `{"prefix": "llm-"}` | tailnet devices (node keys removed) plus `"ip4"`, `"ip6"` |
|
|
37
|
+
| `delete_device` | `{"hostname"}` | `{"status"}` |
|
|
38
|
+
| `shutdown` | – | (worker exits; in-flight deploys are cancelled and cleaned up; SIGTERM/SIGHUP/SIGINT and stdin EOF do the same) |
|
|
39
|
+
|
|
40
|
+
## Deploy progress
|
|
41
|
+
|
|
42
|
+
`data.step` runs through `mint_key → create_pod → wait_pod → wait_tailnet → revoke_key →
|
|
43
|
+
pull_model → ready`. `data.status` is `start`, `progress` (a still-working note for the running step, e.g. every minute while the image pulls), `done`, `warn` or `cancelled`. Extra fields:
|
|
44
|
+
`create_pod/done` carries `pod_id`, `gpu`, `price_per_hr`; `wait_tailnet/done` carries `ip4`,
|
|
45
|
+
`ip6`; `ready/done` carries the full result.
|
|
46
|
+
|
|
47
|
+
On error the reply's `error.kind` says what to do:
|
|
48
|
+
- `unknown_outcome`: a pod **may** exist and bill. Do not retry; send the user to My Pods.
|
|
49
|
+
- `capacity`: no GPU of the chosen types was available. Offer other GPUs.
|
|
50
|
+
- `cancelled`: the user cancelled; `error.cleanup` reports what was terminated or removed.
|
|
51
|
+
- `error`: anything else; `error.cleanup` (if present) reports the teardown.
|
|
52
|
+
|
|
53
|
+
Reach the model at `result.url` (`http://[<tailnet IPv6>]:11434`). Ollama in the pod listens on
|
|
54
|
+
loopback and refuses a `100.x` Host header (DNS-rebinding guard); the IPv6 tailnet address is
|
|
55
|
+
accepted because it is a private address.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
How the starter kit gets a model from "click Deploy" to "chatting privately", and where every
|
|
6
|
+
credential lives along the way.
|
|
7
|
+
|
|
8
|
+
```mermaid
|
|
9
|
+
flowchart LR
|
|
10
|
+
subgraph laptop["Your computer"]
|
|
11
|
+
direction TB
|
|
12
|
+
console["Console (PySide6)<br/><i>never holds a key</i>"]
|
|
13
|
+
worker["Worker process<br/>runpodkit + tailscalekit"]
|
|
14
|
+
vault[("cred-broker (pass/GPG)<br/>or OS keyring")]
|
|
15
|
+
ts_local["Tailscale client"]
|
|
16
|
+
console -- "JSON lines" --> worker
|
|
17
|
+
vault -. "keys injected as env<br/>(cred exec / keyring shim)" .-> worker
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
subgraph runpod["RunPod"]
|
|
21
|
+
direction TB
|
|
22
|
+
api_rp["RunPod API<br/>(REST v2 + GraphQL GPU list)"]
|
|
23
|
+
subgraph pod["GPU pod: llm-starter-ollama image"]
|
|
24
|
+
direction TB
|
|
25
|
+
entry["entrypoint"]
|
|
26
|
+
tsd["tailscaled<br/>(userspace)"]
|
|
27
|
+
ollama["Ollama<br/>127.0.0.1:11434"]
|
|
28
|
+
vol[("/workspace volume<br/>models + tailscale state")]
|
|
29
|
+
entry --> tsd
|
|
30
|
+
entry --> ollama
|
|
31
|
+
ollama --- vol
|
|
32
|
+
tsd --- vol
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
api_ts["Tailscale API"]
|
|
37
|
+
registry["Ollama registry"]
|
|
38
|
+
|
|
39
|
+
worker -- "① mint single-use auth key" --> api_ts
|
|
40
|
+
worker -- "② create pod (GPU fallback)<br/>env: TS_AUTHKEY, OLLAMA_MODEL" --> api_rp
|
|
41
|
+
api_rp --> pod
|
|
42
|
+
tsd -- "③ join tailnet<br/>(key via 0600 file, then discarded)" --> api_ts
|
|
43
|
+
worker -- "④ revoke key once joined" --> api_ts
|
|
44
|
+
ollama -- "⑤ ollama pull" --> registry
|
|
45
|
+
ts_local <-- "⑥ WireGuard tunnel (tailnet only)" --> tsd
|
|
46
|
+
console -- "⑦ chat: http://[fd7a:…]:11434" --> ts_local
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Where credentials live
|
|
50
|
+
|
|
51
|
+
| Credential | Lives | Reaches | Lifetime |
|
|
52
|
+
| --- | --- | --- | --- |
|
|
53
|
+
| RunPod API key | cred-broker or OS keyring on your computer | the worker process's environment only | until you rotate it |
|
|
54
|
+
| Tailscale API key / OAuth client | same | same | until you rotate it (OAuth clients don't expire) |
|
|
55
|
+
| Tailscale **auth key** | minted per deploy | the pod's environment, then a 0600 file `tailscale up` reads, then nowhere | single-use, ≤15 minutes, revoked as soon as the pod joins |
|
|
56
|
+
| Docker Hub token (optional) | same as the API keys | only used for private images | until you rotate it |
|
|
57
|
+
|
|
58
|
+
The console process never receives a key: it asks the worker to do things. Every line the worker
|
|
59
|
+
writes is passed through secret redaction first.
|
|
60
|
+
|
|
61
|
+
## Network exposure
|
|
62
|
+
|
|
63
|
+
- Ollama listens on the pod's **loopback** only. The pod declares **no public ports** in Tailscale
|
|
64
|
+
mode, so nothing about the model is reachable from the internet.
|
|
65
|
+
- Tailscale's userspace networking delivers tailnet traffic to that loopback listener. Clients use
|
|
66
|
+
the pod's **IPv6 tailnet address**: Ollama's DNS-rebinding guard refuses `100.x` Host headers but
|
|
67
|
+
accepts private addresses, and `fd7a:115c:a1e0::/48` is one.
|
|
68
|
+
- Your tailnet policy decides who can reach the pod. The default Tailscale policy allows every device
|
|
69
|
+
to reach every other device; the console warns about that and shows a policy that lets your own
|
|
70
|
+
devices reach `tag:llm-starter:11434` and gives the pod no access to anything.
|
|
71
|
+
- "RunPod public proxy" mode is the exception: it publishes port 11434 through RunPod's HTTPS proxy
|
|
72
|
+
with **no authentication**, for quick tests only.
|
|
73
|
+
|
|
74
|
+
## Money safety
|
|
75
|
+
|
|
76
|
+
- GPU fallback only moves to the next GPU type on a definite refusal; a timeout or 5xx on create is
|
|
77
|
+
never retried (runpodkit's rules), and the console sends you to My Pods instead.
|
|
78
|
+
- A failed or cancelled deploy terminates the pod it created and removes its tailnet device.
|
|
79
|
+
- Stopped pods still bill for their volume; My Pods says so next to each one.
|
|
80
|
+
- Optional auto-stop stops starter pods after N hours while the console is open.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="720" viewBox="0 0 1200 720" role="img" aria-labelledby="t d">
|
|
2
|
+
<title id="t">LLM-on-RunPod starter kit architecture</title>
|
|
3
|
+
<desc id="d">The console on your computer asks a credential-holding worker to mint a single-use Tailscale key and create a RunPod pod; the pod joins your tailnet, the key is revoked, Ollama pulls the model, and you chat over a private WireGuard tunnel.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#0f172a"/><stop offset="1" stop-color="#1e1b4b"/></linearGradient>
|
|
6
|
+
<linearGradient id="acc" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#a78bfa"/><stop offset="1" stop-color="#22d3ee"/></linearGradient>
|
|
7
|
+
<marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#94a3b8"/></marker>
|
|
8
|
+
<marker id="arrA" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0 0L10 5L0 10z" fill="#22d3ee"/></marker>
|
|
9
|
+
<style>
|
|
10
|
+
.zone { fill: #0b1222; stroke: #334155; stroke-width: 1.5; }
|
|
11
|
+
.box { fill: #1e293b; stroke: #475569; stroke-width: 1.2; }
|
|
12
|
+
.hot { fill: #1e1b4b; stroke: #a78bfa; stroke-width: 1.5; }
|
|
13
|
+
.ztitle { font: 700 17px -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; fill: #e2e8f0; }
|
|
14
|
+
.btitle { font: 600 15px -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; fill: #f1f5f9; }
|
|
15
|
+
.bsub { font: 12.5px -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; fill: #94a3b8; }
|
|
16
|
+
.mono { font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, 'DejaVu Sans Mono', monospace; fill: #a5f3fc; }
|
|
17
|
+
.lab { font: 12.5px -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; fill: #cbd5e1; }
|
|
18
|
+
.num { font: 700 12px -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; fill: #0f172a; }
|
|
19
|
+
.line { stroke: #94a3b8; stroke-width: 1.6; fill: none; }
|
|
20
|
+
.tun { stroke: #22d3ee; stroke-width: 2.5; fill: none; stroke-dasharray: 7 5; }
|
|
21
|
+
.dot { stroke: #a78bfa; stroke-width: 1.5; fill: none; stroke-dasharray: 3 4; }
|
|
22
|
+
</style>
|
|
23
|
+
</defs>
|
|
24
|
+
<rect width="1200" height="720" rx="22" fill="url(#bg)"/>
|
|
25
|
+
<text x="40" y="50" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="24" font-weight="700" fill="url(#acc)">llm-starter</text>
|
|
26
|
+
<text x="222" y="50" class="lab" font-size="15">from "Deploy" to a private chat, and where every key lives</text>
|
|
27
|
+
|
|
28
|
+
<!-- Your computer -->
|
|
29
|
+
<rect x="30" y="80" width="370" height="610" rx="16" class="zone"/>
|
|
30
|
+
<text x="50" y="110" class="ztitle">Your computer</text>
|
|
31
|
+
<rect x="88" y="130" width="287" height="70" rx="12" class="hot"/>
|
|
32
|
+
<text x="106" y="160" class="btitle">Console (PySide6)</text>
|
|
33
|
+
<text x="106" y="182" class="bsub">never holds a key</text>
|
|
34
|
+
<rect x="88" y="265" width="287" height="80" rx="12" class="box"/>
|
|
35
|
+
<text x="106" y="295" class="btitle">Worker process</text>
|
|
36
|
+
<text x="106" y="317" class="mono">runpodkit · tailscalekit</text>
|
|
37
|
+
<text x="106" y="335" class="bsub">holds keys in its env only</text>
|
|
38
|
+
<rect x="88" y="410" width="287" height="70" rx="12" class="box"/>
|
|
39
|
+
<text x="106" y="440" class="btitle">cred-broker or OS keyring</text>
|
|
40
|
+
<text x="106" y="462" class="bsub">encrypted, local only</text>
|
|
41
|
+
<rect x="88" y="585" width="287" height="70" rx="12" class="box"/>
|
|
42
|
+
<text x="106" y="615" class="btitle">Tailscale client</text>
|
|
43
|
+
<text x="106" y="637" class="bsub">your normal tailnet device</text>
|
|
44
|
+
<path d="M231 200 V265" class="line" marker-end="url(#arr)"/>
|
|
45
|
+
<text x="241" y="238" class="lab">JSON lines</text>
|
|
46
|
+
<path d="M231 410 V345" class="dot" marker-end="url(#arr)"/>
|
|
47
|
+
<text x="241" y="383" class="lab">keys injected as env</text>
|
|
48
|
+
<path d="M88 165 H62 V620 H88" class="line" marker-end="url(#arr)"/>
|
|
49
|
+
<circle cx="62" cy="230" r="10" fill="url(#acc)"/><text x="58" y="234" class="num">7</text>
|
|
50
|
+
<text x="50" y="520" class="lab" transform="rotate(-90 50 520)">chat http://[fd7a:…]:11434</text>
|
|
51
|
+
|
|
52
|
+
<!-- Tailscale API (middle top) and Ollama registry (middle bottom) -->
|
|
53
|
+
<rect x="470" y="130" width="260" height="70" rx="12" class="box"/>
|
|
54
|
+
<text x="490" y="160" class="btitle">Tailscale API</text>
|
|
55
|
+
<text x="490" y="182" class="bsub">auth keys · devices · policy</text>
|
|
56
|
+
<rect x="470" y="610" width="260" height="60" rx="12" class="box"/>
|
|
57
|
+
<text x="490" y="637" class="btitle">Ollama registry</text>
|
|
58
|
+
<text x="490" y="657" class="bsub">model weights</text>
|
|
59
|
+
|
|
60
|
+
<!-- RunPod -->
|
|
61
|
+
<rect x="790" y="80" width="380" height="610" rx="16" class="zone"/>
|
|
62
|
+
<text x="810" y="110" class="ztitle">RunPod</text>
|
|
63
|
+
<rect x="815" y="130" width="330" height="70" rx="12" class="box"/>
|
|
64
|
+
<text x="835" y="160" class="btitle">RunPod API</text>
|
|
65
|
+
<text x="835" y="182" class="bsub">REST v2 pods · GraphQL GPU prices</text>
|
|
66
|
+
<rect x="815" y="250" width="330" height="420" rx="14" fill="#111a2e" stroke="#a78bfa" stroke-width="1.5" stroke-dasharray="6 4"/>
|
|
67
|
+
<text x="835" y="278" class="btitle">GPU pod</text>
|
|
68
|
+
<text x="905" y="278" class="mono">llm-starter-ollama</text>
|
|
69
|
+
<rect x="840" y="300" width="280" height="56" rx="10" class="box"/>
|
|
70
|
+
<text x="860" y="333" class="btitle">entrypoint</text>
|
|
71
|
+
<text x="950" y="333" class="bsub">unsets the key, supervises</text>
|
|
72
|
+
<rect x="840" y="390" width="280" height="64" rx="10" class="hot"/>
|
|
73
|
+
<text x="860" y="418" class="btitle">tailscaled</text>
|
|
74
|
+
<text x="860" y="440" class="bsub">userspace · key read from a 0600 file</text>
|
|
75
|
+
<rect x="840" y="488" width="280" height="64" rx="10" class="hot"/>
|
|
76
|
+
<text x="860" y="516" class="btitle">Ollama</text>
|
|
77
|
+
<text x="860" y="538" class="mono">127.0.0.1:11434</text>
|
|
78
|
+
<rect x="840" y="590" width="280" height="56" rx="10" class="box"/>
|
|
79
|
+
<text x="860" y="623" class="btitle">/workspace volume</text>
|
|
80
|
+
<text x="1010" y="623" class="bsub">models · state</text>
|
|
81
|
+
<path d="M980 356 V390" class="line" marker-end="url(#arr)"/>
|
|
82
|
+
<path d="M980 454 V488" class="line" marker-end="url(#arr)"/>
|
|
83
|
+
<path d="M980 200 V250" class="line" marker-end="url(#arr)"/>
|
|
84
|
+
|
|
85
|
+
<!-- numbered flows -->
|
|
86
|
+
<path d="M375 285 C 430 250, 430 175, 470 168" class="line" marker-end="url(#arr)"/>
|
|
87
|
+
<circle cx="420" cy="230" r="10" fill="url(#acc)"/><text x="416" y="234" class="num">1</text>
|
|
88
|
+
<text x="436" y="236" class="lab">mint single-use key</text>
|
|
89
|
+
<path d="M375 300 C 560 300, 650 165, 815 165" class="line" marker-end="url(#arr)"/>
|
|
90
|
+
<circle cx="600" cy="252" r="10" fill="url(#acc)"/><text x="596" y="256" class="num">2</text>
|
|
91
|
+
<text x="616" y="258" class="lab">create pod (GPU fallback)</text>
|
|
92
|
+
<path d="M840 420 C 760 420, 700 260, 640 200" class="line" marker-end="url(#arr)"/>
|
|
93
|
+
<circle cx="742" cy="350" r="10" fill="url(#acc)"/><text x="738" y="354" class="num">3</text>
|
|
94
|
+
<text x="652" y="354" class="lab">join tailnet</text>
|
|
95
|
+
<path d="M375 330 C 470 330, 520 250, 545 200" class="line" marker-end="url(#arr)"/>
|
|
96
|
+
<circle cx="500" cy="296" r="10" fill="url(#acc)"/><text x="496" y="300" class="num">4</text>
|
|
97
|
+
<text x="450" y="327" class="lab">revoke key once joined</text>
|
|
98
|
+
<path d="M840 530 C 780 560, 740 620, 730 640" class="line" marker-end="url(#arr)"/>
|
|
99
|
+
<circle cx="770" cy="585" r="10" fill="url(#acc)"/><text x="766" y="589" class="num">5</text>
|
|
100
|
+
<text x="652" y="590" class="lab">ollama pull</text>
|
|
101
|
+
<path d="M375 620 C 560 620, 640 460, 840 422" class="tun" marker-start="url(#arrA)" marker-end="url(#arrA)"/>
|
|
102
|
+
<circle cx="560" cy="555" r="10" fill="url(#acc)"/><text x="556" y="559" class="num">6</text>
|
|
103
|
+
<text x="430" y="540" class="lab" fill="#a5f3fc">private WireGuard tunnel (tailnet only)</text>
|
|
104
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1.7
|
|
2
|
+
FROM ollama/ollama:0.40.19 AS tailscale
|
|
3
|
+
ARG TARGETARCH
|
|
4
|
+
ARG TAILSCALE_VERSION=1.104.7
|
|
5
|
+
ARG TAILSCALE_SHA256=e56693ff74a64f2591b7e819c280635a100aae1ddfb0ef058fcd052b7cd8d16c
|
|
6
|
+
RUN if [ "$TARGETARCH" != amd64 ]; then echo 'This image supports linux/amd64 only (TARGETARCH must be amd64).' >&2; exit 1; fi
|
|
7
|
+
ADD --checksum=sha256:${TAILSCALE_SHA256} https://pkgs.tailscale.com/stable/tailscale_${TAILSCALE_VERSION}_amd64.tgz /tmp/tailscale.tgz
|
|
8
|
+
RUN mkdir -p /opt/tailscale && tar -xzf /tmp/tailscale.tgz -C /opt/tailscale --strip-components=1 \
|
|
9
|
+
"tailscale_${TAILSCALE_VERSION}_amd64/tailscale" \
|
|
10
|
+
"tailscale_${TAILSCALE_VERSION}_amd64/tailscaled"
|
|
11
|
+
|
|
12
|
+
FROM ollama/ollama:0.40.19
|
|
13
|
+
ARG IMAGE_VERSION=dev
|
|
14
|
+
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
|
15
|
+
COPY --from=tailscale /opt/tailscale/tailscale /opt/tailscale/tailscaled /usr/local/bin/
|
|
16
|
+
COPY --chmod=0755 entrypoint.sh /usr/local/bin/llmstarter-entrypoint
|
|
17
|
+
ENV OLLAMA_HOST=127.0.0.1:11434 OLLAMA_MODELS=/workspace/ollama/models
|
|
18
|
+
LABEL org.opencontainers.image.source="https://github.com/kcherry497/runpod-llm-starter" \
|
|
19
|
+
org.opencontainers.image.licenses="MIT" \
|
|
20
|
+
org.opencontainers.image.description="Ollama for RunPod GPU pods with private Tailscale userspace networking" \
|
|
21
|
+
org.opencontainers.image.title="runpod-llm-starter-ollama" \
|
|
22
|
+
org.opencontainers.image.version="${IMAGE_VERSION}"
|
|
23
|
+
STOPSIGNAL SIGTERM
|
|
24
|
+
ENTRYPOINT ["/usr/local/bin/llmstarter-entrypoint"]
|
|
25
|
+
CMD []
|