Add package data for GPU rent and update CLI documentation

- Added package data configuration for the 'gpu_rent' package in pyproject.toml.
- Updated README.md to include usage instructions for Windows and Unix launchers.
- Enhanced CLI documentation in cli.md to reflect new commands and their functionalities.
- Revised setup.md to clarify installation steps and environment setup.
- Improved error handling and command descriptions in the CLI implementation.
- Added new functions for model version handling and flavor resolution in the codebase.
- Updated state management to include additional properties for better tracking.
This commit is contained in:
Leonid Pershin
2026-08-21 03:06:51 +03:00
parent 167d07a733
commit 615cf81493
34 changed files with 2733 additions and 117 deletions
+21 -10
View File
@@ -8,19 +8,30 @@
## Что уже можно запустить
Windows (cmd или двойной клик): `gpu-rent.bat`
PowerShell: `.\gpu-rent.ps1`
Linux / macOS / Git Bash: `./gpu-rent.sh`
Скрипты сами создают `.venv`, ставят пакет и прокидывают аргументы. Активировать окружение не нужно.
```powershell
python -m venv .venv
.\.venv\Scripts\activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
copy env.example $env:USERPROFILE\.gpu-rent\.env
# заполни OS_* по docs/setup.md
gpu-rent doctor
gpu-rent dry-run
gpu-rent status
.\gpu-rent.ps1 doctor
.\gpu-rent.ps1 dry-run
.\gpu-rent.ps1 status
# если doctor зелёный и квота GPU > 0:
.\gpu-rent.ps1 up --yes
.\gpu-rent.ps1 tunnel
.\gpu-rent.ps1 stop
```
`up` / `stop` / `tunnel` пока не создают сервер: сначала `doctor` должен быть зелёным и квота GPU > 0.
```bash
chmod +x gpu-rent.sh # один раз на Unix
./gpu-rent.sh doctor
```
Ключи: скопируй `env.example` в `%USERPROFILE%\.gpu-rent\.env` (скрипт сделает это сам при первом запуске) и заполни `OS_*` по [`docs/setup.md`](docs/setup.md).
`up` поднимает compute и ставит SwarmUI нативно (`launch-linux.sh` + systemd). `tunnel` пробрасывает `localhost:17801`. `stop` гасит GPU, диски оставляет.
## Зачем какие ключи