Leonid Pershin aca8d5e990 Enhance logging and progress handling in SSH operations
- Updated the `_log_default` function to handle messages starting with `\r` for in-place updates.
- Introduced `split_ssh_stream` to differentiate between line and progress events in SSH output.
- Implemented `feed_ssh_log` to dispatch log messages based on event type.
- Refactored `_stream_pty_output` to utilize the new logging and event handling functions.
- Enhanced the `log` function in `term.py` to support progress updates, ensuring a cleaner output experience.
- Updated `DownloadProgress` classes in `civitai_fetch.py` and `llamacpp_fetch.py` to print progress in place, improving user feedback during downloads.
2026-08-21 07:20:28 +03:00
2026-08-21 02:42:48 +03:00
2026-08-21 02:42:48 +03:00
2026-08-21 02:42:48 +03:00
2026-08-21 02:42:48 +03:00
2026-08-21 02:42:48 +03:00

gpu-rent

Прерываемый GPU в Selectel + SwarmUI на http://127.0.0.1:17801.

Модели и ComfyUI живут на сетевом диске. GPU платится только пока жив compute (upstop или idle-killer). Диск — всегда, даже после stop.


С нуля → первая картинка

Делай по порядку. Подробности и скрины панели — в docs/setup.md.

# Шаг Команда / действие
1 Python 3.11+, клон репо
2 Квота GPU в Selectel (> 0) или тикет setup §2
3 Сервисный пользователь + .env из RC setup §3
4 (Опц.) Civitai token + models.yaml setup §4
5 Preflight .\gpu-rent.ps1 doctor
6 Поднять GPU + туннель .\gpu-rent.ps1 up --yes
7 Открыть UI браузер сам / .\gpu-rent.ps1 open
8 Закончить сессию .\gpu-rent.ps1 stop

Unix: ./gpu-rent.sh … (один раз chmod +x gpu-rent.sh).

Не начинай с up, пока doctor не зелёный. Ключ панели X-Token для этого CLI не подходит.


Обычный день

.\gpu-rent.ps1 up --yes          # GPU + SwarmUI + туннель :17801
# работаешь в браузере…
# Ctrl+C в терминале = только туннель off, GPU жив
.\gpu-rent.ps1 tunnel --open     # снова UI
.\gpu-rent.ps1 hold              # отложить idle-killer
.\gpu-rent.ps1 stop              # погасить GPU, диски оставить
Важно
Ctrl+C на туннеле не гасит GPU
Простой ~30 мин idle-killer сам удалит compute
Preemptible ~24 ч → EXPIRED; tunnel / up поднимут снова
Двойной клик лаунчера задай GPU_RENT_DEFAULT_ARGS=up --yes в gpu-rent.vars

Команды (кратко)

Команда Смысл
setup Wizard: .env, LLM, watchdog
doctor Preflight без create
flavors / dry-run Что выберет / план без денег
up / up --yes GPU + seed + туннель; без --yes — меню Selectel/LLM
up --ollama / --llamacpp + LLM (см. docs/llm.md)
up --llm-only --llamacpp только LLM, без SwarmUI
tunnel / open Снова UI / браузер
hold / status Пауза killer / состояние
stop / destroy --i-understand-data-loss Стоп GPU / + диски
push / pull-output / seed-* / capture Файлы ↔ VM; capture = ссылки в yaml

Полный список: docs/cli.md.


Конфиг в корне репо

Файл Что
.env из env.exampleOS_*, Civitai (не в git)
gpu-rent.vars из example — несекретные дефолты, лаунчер
models.yaml / extensions.yaml манифесты (из *.example.yaml)
ollama-models.yaml / llamacpp-models.yaml LLM (из example; gitignore)
Models/ локальный push на up
.gpu-rent/ state, SSH-ключ (gitignore)

Лаунчер сам создаёт .venv и ставит пакет.


Документация

Док Зачем
docs/setup.md Пошаговая подготовка до первого up
docs/cli.md Все команды и переменные
docs/llm.md Ollama / llama.cpp
docs/models.md Civitai + папка Models/
docs/spike-notes.md Чеклист первого живого прогона
docs/README.md Оглавление всего docs/

MIT. Секреты и веса в git не коммитить.

S
Description
No description provided
Readme MIT
3.5 MiB
Languages
Python 96.5%
Shell 2.6%
PowerShell 0.8%