Leonid Pershin 1f7237f7db Implement SSH user data handling and adjust volume size
- Added functions to generate SSH user data in cloud-config format and encode it in Base64 for server creation.
- Updated the `create_gpu_server` function to include public key handling for SSH access.
- Adjusted the default boot volume size from 40GB to 30GB in `os_client.py`.
- Enhanced the `cmd_up` function to manage SSH key injection and server state more effectively.
- Improved logging for SSH connection attempts and error handling in `wait_ssh` to provide clearer feedback on authentication issues.
2026-08-21 04:35:02 +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 только пока он поднят.

Сначала ключи и квота GPU, не up.docs/setup.md


Быстрый старт

.\gpu-rent.ps1 doctor          # preflight
.\gpu-rent.ps1 flavors         # что выберет фоллбек
.\gpu-rent.ps1 dry-run         # план без create
.\gpu-rent.ps1 up --yes        # GPU + SwarmUI + seed
.\gpu-rent.ps1 tunnel          # UI на :17801 (Ctrl+C ≠ stop)
.\gpu-rent.ps1 hold            # отложить idle-killer
.\gpu-rent.ps1 stop            # гасить compute, диски оставить

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

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

Файл Что
.env из env.exampleOS_*, Civitai
models.yaml из models.example.yaml — seed с Civitai
extensions.yaml из extensions.example.yaml
.gpu-rent/ state, SSH-ключ (gitignore)

Команды

Команда Смысл
doctor Keystone, квота GPU, flavor, Civitai, манифесты
flavors Живой список по FLAVOR_PREFERENCE
up / up --yes / up --no-spot / up --flavor ID Поднять GPU
tunnel / tunnel --open SSH-проброс; watchdog на EXPIRED
open Браузер на 17801
hold / hold --minutes 90 / hold --clear Пауза idle-killer
status Nova + диск + killer
seed-models / seed-extensions Докачать на живой диск
push / push-models / pull-output Локальные папки ↔ VM
resize-data --gb 400 Диск только вверх
stop / destroy --i-understand-data-loss Стоп GPU / + диски

Деньги и риски

  • GPU — пока жив compute (upstop или idle-killer).
  • Диск data24/7, даже после stop.
  • Цены в OpenStack API нет — смотри панель Selectel.
  • Preemptible по умолчанию (~24 ч) → EXPIRED; tunnel сам unshelve, иначе up.
  • Idle-killer: льгота после boot, потом N мин пустой очереди → delete. hold откладывает.
  • Ctrl+C на tunnel не гасит GPU.

Модели

  1. Civitai-seed по models.yaml (нужен CIVITAI_API_TOKEN, хост civitai.red).
  2. Локальные Models/, Wildcards/, CustomWorkflows/ — непустые едут на каждый up.

Пример в репо уже с Krea 2 + LoRA — скопируй в models.yaml.


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

Док Зачем
docs/setup.md Ключи, квота, RC
docs/spike-notes.md Чеклист живого spike
docs/cli.md Все команды и .env
docs/decisions.md Продуктовые решения
docs/roadmap.md Что готово / что нет

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

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