Add support for gpu-rent.vars and enhance git update functionality
- Updated .gitignore to include gpu-rent.vars. - Modified env.example to introduce the UPDATE_GIT variable for controlling git updates during execution. - Implemented Import-GpuRentVars function in gpu-rent.ps1 to load environment variables from gpu-rent.vars. - Enhanced gpu-rent.sh to support loading variables from gpu-rent.vars and added logic for handling default and extra arguments. - Updated CLI documentation to reflect the new gpu-rent.vars file and its usage in configuration. - Improved bootstrap and provisioning logic to conditionally perform git updates based on the new configuration.
This commit is contained in:
+21
-2
@@ -8,7 +8,8 @@
|
||||
| --- | --- |
|
||||
| `gpu-rent flavors` | Скан `SCAN_POOLS` (ru-6 multizone…) × `FLAVOR_PREFERENCE`, затем список в текущем `OS_REGION_NAME` |
|
||||
| `gpu-rent doctor` | Preflight **без** create: Keystone, квота GPU, flavor в AZ, диски, Civitai token+`.red`, манифесты, SSH-ключ. Код выхода ≠ 0, если сессию нельзя начать |
|
||||
| `gpu-rent up` / `up --yes` | Preflight → create/unshelve → bootstrap → **туннель** `localhost:17801` + URL панели; Ctrl+C закрывает туннель |
|
||||
| `gpu-rent up` / `up --yes` | Preflight → create/unshelve → bootstrap → git update SwarmUI/extensions → **туннель** `localhost:17801`; Ctrl+C закрывает туннель |
|
||||
| `gpu-rent up --no-update` | Без `git pull` SwarmUI и extensions (только недостающие clone) |
|
||||
| `gpu-rent up --no-tunnel` | Только облако + bootstrap, без локального проброса |
|
||||
| `gpu-rent up --no-spot` | Обычный (не preemptible) сервер |
|
||||
| `gpu-rent up --flavor … --yes` | Без вопросов. `--flavor` бьёт список фоллбека. `--yes` без `--flavor` берёт первый доступный из `FLAVOR_PREFERENCE` |
|
||||
@@ -100,7 +101,25 @@ Hold killer: gpu-rent hold
|
||||
|
||||
## Конфигурация
|
||||
|
||||
`.env` в корне репозитория (рядом с `env.example`):
|
||||
| Файл | Назначение |
|
||||
| --- | --- |
|
||||
| `.env` | Секреты и OpenStack (`OS_*`, токены). Не в git |
|
||||
| `gpu-rent.vars` | Параметры запуска / несекретные дефолты. Читают `gpu-rent.ps1` / `.sh` / `.bat` и CLI. Пример: `gpu-rent.vars.example` |
|
||||
| `models.yaml` / `extensions.yaml` | Манифесты |
|
||||
|
||||
`.env` в корне репозитория (рядом с `env.example`).
|
||||
|
||||
В `gpu-rent.vars` (создаётся из example при первом запуске):
|
||||
|
||||
```env
|
||||
# Двойной клик / запуск без аргументов:
|
||||
GPU_RENT_DEFAULT_ARGS=up --yes
|
||||
|
||||
# Дописать ко всем вызовам:
|
||||
# GPU_RENT_EXTRA_ARGS=--no-update
|
||||
|
||||
UPDATE_GIT=true
|
||||
```
|
||||
|
||||
```env
|
||||
OS_AUTH_URL=https://cloud.api.selcloud.ru/identity/v3
|
||||
|
||||
Reference in New Issue
Block a user