Enhance LLM and SwarmUI integration with improved configuration options
- Updated `env.example` and `gpu-rent.vars.example` to include new variables for LLM runtime and SwarmUI options. - Refactored CLI commands to support interactive selection of LLM runtime and workload type (SwarmUI, LLM, or both). - Improved access link generation to handle cases where SwarmUI is disabled, providing clearer user feedback. - Enhanced provisioning logic to conditionally bootstrap SwarmUI based on user configuration, allowing for LLM-only setups. - Updated documentation across multiple files to reflect changes in LLM integration, CLI usage, and configuration management.
This commit is contained in:
@@ -24,14 +24,18 @@ def run_bootstrap(
|
||||
update: bool = True,
|
||||
light: bool = False,
|
||||
) -> None:
|
||||
if light:
|
||||
skip_swarm = not bool(getattr(cfg, "enable_swarmui", True))
|
||||
if skip_swarm:
|
||||
log("bootstrap llm-only (data disk, без SwarmUI)")
|
||||
elif light:
|
||||
log("bootstrap SwarmUI (light: без apt)")
|
||||
else:
|
||||
log("bootstrap SwarmUI на VM (идемпотентно, без Docker)")
|
||||
if update:
|
||||
log("git update: SwarmUI on")
|
||||
else:
|
||||
log("git update: SwarmUI off (--no-update)")
|
||||
if not skip_swarm:
|
||||
if update:
|
||||
log("git update: SwarmUI on")
|
||||
else:
|
||||
log("git update: SwarmUI off (--no-update)")
|
||||
script = bootstrap_script()
|
||||
out = run_script_sudo(
|
||||
cfg,
|
||||
@@ -43,9 +47,13 @@ def run_bootstrap(
|
||||
"SWARM_USER": cfg.ssh_user,
|
||||
"GPU_RENT_UPDATE_GIT": "1" if update else "0",
|
||||
"GPU_RENT_BOOTSTRAP_LIGHT": "1" if light else "0",
|
||||
"GPU_RENT_SKIP_SWARMUI": "1" if skip_swarm else "0",
|
||||
},
|
||||
log=log,
|
||||
)
|
||||
if "bootstrap ok" not in out:
|
||||
raise CloudError(f"bootstrap не подтвердил успех:\n{out[-800:]}")
|
||||
log("диски и systemd unit готовы; дальше seed, потом start swarmui")
|
||||
if skip_swarm:
|
||||
log("data disk готов — дальше LLM")
|
||||
else:
|
||||
log("диски и systemd unit готовы; дальше seed, потом start swarmui")
|
||||
|
||||
Reference in New Issue
Block a user