Commit Graph
86 Commits
Author SHA1 Message Date
Leonid Pershin d06b4f4fdc Fix console output in logs function to prevent rich markup issues with MSBuild paths. Set markup and highlight to False for better compatibility. 2026-08-23 04:44:31 +03:00
Leonid PershinandCursor d934fc9366 Expose ollama-roles default_chat for Assistent senior model default.
Write preferred chat tag into Assistent/ollama-roles.json so UI and warmup align with manifest default: true.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 03:50:58 +03:00
Leonid PershinandCursor 3620ac2b5e Note Assistent 0.10.8 cheap-bug fixes for seed-extensions on main.
Keeps gpu-rent docs aligned with the extension branch operators pull.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 03:22:03 +03:00
Leonid PershinandCursor 7be2c27a67 Seed Assistent personas from a shelf folder instead of yaml prompts.
Push assistent-personas/ JSON overlays without wiping VM clones or exact.controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 01:48:01 +03:00
Leonid PershinandCursor 03ba4cb6ed Seed Assistent personas as overlay folders and tighten Ollama/Assistent glue.
gpu-rent now writes personas/<id>/ on the VM (not legacy personas.json), adds seed-personas/doctor checks, and shortens mid/high keep-alive now that Assistent parks the LLM before Generate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 01:00:14 +03:00
Leonid PershinandCursor 789fa26918 Pick cheapest GPU SKU and pin the VM to an existing disk AZ.
Scan ru-6 by Nova availability zones (a/b/c). First boot uses FLAVOR_SIZE_PRESET=cheap; reruns stay on the disk segment.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 00:06:44 +03:00
Leonid PershinandCursor 5d0c30f66b Enhance Ollama integration and model management
- Implemented support for parallel embedding in Ollama, allowing for improved performance in chat and memory functions.
- Updated the `ollama-roles.json` and CPU Modelfile to accommodate new features.
- Increased the maximum loaded models and parallel processing limits to 2, optimizing resource usage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 23:05:48 +03:00
Leonid PershinandCursor 4081890b4c Support Ollama use: chat|memory and parallel embed beside VL.
Pull nomic-embed-text for Assistent memory, write ollama-roles.json, CPU Modelfile, and raise MAX_LOADED_MODELS/NUM_PARALLEL to 2.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 22:47:03 +03:00
Leonid PershinandCursor 44f46d8190 Add cinema/terse Assistent personas and note personas.json overlay.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 22:04:36 +03:00
Leonid PershinandCursor 6c45a7560e Add capture wanted and harden Assistent wanted-queue merge.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 21:29:00 +03:00
Leonid PershinandCursor 08120194f9 Deduplicate wanted-queue merge into capture to avoid circular imports.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 21:25:00 +03:00
Leonid PershinandCursor ec8bd28ce0 Add assistent-personas support and enhance model merging functionality
- Introduced `assistent-personas.yaml` to the project and updated the `.gitignore` accordingly.
- Implemented functions to seed and merge assistent personas from local files to the VM.
- Enhanced the model capture process to include merging of wanted models from the VM into `models.yaml`.
- Updated documentation to reflect changes in the assistent personas and model management processes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 21:21:53 +03:00
Leonid PershinandCursor 36e29668b0 Note Assistent 0.4 board in the extensions seed docs.
gpu-rent still clones swarm-assistent from main; the UI now has Generate/Ref windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 20:56:48 +03:00
Leonid PershinandCursor ffe5a031b4 Warm Ollama into VRAM on up and tunnel so Assistent chat is not cold.
A 1-token /api/chat after tags (and again if /api/ps is empty) loads VL weights before the first message. Mid KEEP_ALIVE is 15m so a short image-gen burst does not unload the model.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 20:47:14 +03:00
Leonid Pershin 79cb0a7e25 Enhance error handling and state management in access card and session modules
- Updated the `render_access_panel` function to conditionally hide LLM errors when the Ollama model is operational, improving user experience by reducing unnecessary error visibility.
- Introduced a new `_notes_from_disk` function to streamline the retrieval of notes from disk, enhancing state management during GPU environment checks.
- Refactored error handling in the `_bind_access` function to ensure that stack and GPU environment errors are accurately recorded and managed, improving robustness in session state updates.
- Added tests to validate the new behavior of error handling and state management, ensuring that LLM errors are appropriately suppressed when conditions are met.
2026-08-21 20:20:49 +03:00
Leonid Pershin f8f8dcc93e Update documentation to clarify GPU control commands
- Revised README, architecture, CLI, and other documentation to specify that both `Ctrl+C` and `Ctrl+D` now stop the GPU while preserving disk data, correcting previous inaccuracies.
- Enhanced access card and setup instructions to reflect the updated command behavior for better user understanding.
- Updated tests to ensure the new command behaviors are validated and documented correctly, improving overall clarity in GPU management.
2026-08-21 20:12:03 +03:00
Leonid Pershin a882964ce0 Update GPU performance tuning and documentation for context length
- Enhanced the `OllamaTune` class to include a new `context_length` attribute, improving the configuration for different GPU tiers.
- Updated performance tuning logic to set appropriate context lengths for low, mid, high, and ultra tiers, ensuring optimal resource allocation.
- Modified installation scripts to reflect the new context length settings, enhancing the installation process for Ollama.
- Revised documentation to include context length details in the GPU performance table, providing clearer guidance for users.
- Added tests to validate the correct context length settings in various scenarios, ensuring robustness in performance tuning.
2026-08-21 20:05:33 +03:00
Leonid Pershin 5832c5cf75 Enhance Ollama model management and performance tuning
- Updated the `provision_llm` function to utilize the `/api/tags` endpoint for verifying available models, improving accuracy in model management.
- Introduced a new `already_have_ollama_tag` function to ensure exact tag matching, preventing mismatches during model checks.
- Enhanced the `pull_stream` function to require a successful status from the API before proceeding, ensuring reliable model downloads.
- Added logic to handle unwritten blob files, improving the robustness of the model pulling process.
- Updated documentation and tests to reflect these changes, ensuring clarity and reliability in Ollama model operations.
2026-08-21 14:20:06 +03:00
Leonid Pershin f437cd0373 Update documentation and CLI behavior for GPU management
- Clarified the behavior of `Ctrl+C` and `Ctrl+D` in the README and other documentation, specifying that `Ctrl+C` only stops the tunnel while keeping the GPU active, and `Ctrl+D` stops the GPU while preserving disk data.
- Enhanced the CLI documentation to reflect these changes, ensuring users understand the implications of these commands during GPU operations.
- Improved the handling of data bindings and remounting logic in the codebase to prevent issues with empty model tabs in the UI.
- Added tests to validate the new command behaviors and ensure proper documentation alignment.
2026-08-21 13:25:55 +03:00
Leonid Pershin 1d18ece17b Enhance installation state management and diagnostics for ComfyUI
- Updated the `gpu-rent` logic to ensure the `IsInstalled` flag is accurately set based on the presence of ComfyUI, preventing conflicts during installation.
- Improved the handling of the `/mnt/swarm_data` directory to skip creation if it does not exist, enhancing robustness in provisioning.
- Added tests to validate the new installation state checks and ensure proper diagnostics during the installation process, including scenarios for clearing and setting the `IsInstalled` flag.
2026-08-21 12:48:44 +03:00
Leonid Pershin f8ce9d1981 Update comfy_on_disk function to include additional candidate paths for ComfyUI detection
- Added a loop to check for the presence of ComfyUI in specified candidate paths, enhancing the logic for determining if ComfyUI is installed on disk.
- This change improves the accuracy of installation state reporting by expanding the search for ComfyUI binaries.
2026-08-21 12:47:37 +03:00
Leonid Pershin d785f47534 Enhance Settings.fds management and installation flag handling
- Introduced `comfy_on_disk` and `sync_is_installed` functions to manage the `IsInstalled` flag based on the presence of ComfyUI, ensuring accurate installation state reporting.
- Updated `install_swarm_comfy.py` to clear the `IsInstalled` flag when necessary, allowing the installation process to proceed without conflicts.
- Improved logic to prevent setting `IsInstalled` to true on first boot or empty data volumes, addressing issues with the InstallConfirmWS process.
- Enhanced diagnostics and logging for installation state changes, providing clearer feedback during the installation process.
2026-08-21 12:47:25 +03:00
Leonid Pershin 57d38bd9f6 Enhance backend loading diagnostics and remount logic
- Introduced a new `loading_fail_sec` parameter in the `wait_backend_idle` function to handle prolonged loading states, improving error handling for backend readiness.
- Updated the `ensure_dlbackend_bind` function to stop SwarmUI before remounting, preventing target busy errors and ensuring consistent data mounts.
- Enhanced the `recover_errored_backends` function to account for the new remount logic, improving backend recovery processes.
- Refactored tests to validate the new loading failure conditions and ensure proper handling of backend states during diagnostics.
2026-08-21 12:24:31 +03:00
Leonid Pershin 491816b679 Enhance ExtraArgs sanitization and backend recovery logic
- Introduced the `clean_extra_args` function to filter out unsafe CLI flags and comment garbage from `ExtraArgs`, improving backend configuration integrity.
- Updated the `repair_extra_args_on_disk` function to rewrite corrupted `ExtraArgs` lines in the FDS file, ensuring cleaner backend settings.
- Enhanced the `recover_errored_backends` function to utilize the new sanitization logic, preserving valid `ExtraArgs` during backend reconfiguration.
- Improved the `sanitize_backends_fds` function to drop comment garbage and retain valid entries, enhancing overall backend management.
- Added tests to validate the new sanitization behavior, ensuring robustness in handling `ExtraArgs` during backend operations.
2026-08-21 11:56:53 +03:00
Leonid Pershin b9059cd275 Enhance backend configuration and sanitization logic
- Updated the `recover_errored_backends` function to preserve `ExtraArgs` during backend reconfiguration, improving error recovery.
- Refined the `sanitize_backends_fds` function to prevent newline merging issues with bare `\\x` entries, ensuring correct FDS formatting.
- Enhanced the `configure_comfy_backend` function to accept and manage `ExtraArgs`, preventing loss of important configuration during recovery.
- Added tests to validate the new sanitization behavior and ensure that bare `\\x` entries remain intact, improving overall backend management.
2026-08-21 11:50:01 +03:00
Leonid Pershin 021feaa839 Enhance backend management and performance tuning
- Introduced remounting logic for data directories to ensure correct bindings before restarting services, improving reliability during performance tuning.
- Added functions to sanitize and ensure absolute paths for backend scripts, preventing issues with relative paths in bind mounts.
- Enhanced the `patch_backends_extra_args` function to clean up corrupted entries and ensure proper configuration of backend parameters.
- Updated tests to validate the new sanitization and path handling functionalities, ensuring robustness in backend management.
2026-08-21 11:44:25 +03:00
Leonid Pershin fc60fef279 Enhance Settings.fds management and installation checks
- Introduced functions to ensure the `IsInstalled` flag is set in `Settings.fds`, preventing the UI from displaying the /Install wizard.
- Added logic to create or patch `Settings.fds` with installation details, including the installation date and version.
- Updated the `install_swarm_comfy.py` script to call the new function, ensuring the installation state is correctly managed during backend operations.
- Added tests to verify the presence of the `IsInstalled` flag in the relevant scripts and ensure proper functionality during installation checks.
2026-08-21 11:27:06 +03:00
Leonid Pershin 241ada62cb Enhance CLI options and idle-killer functionality
- Added a `--update` option to the `up` command in the CLI for forced updates during warm ACTIVE states.
- Improved the idle-killer logic with new functions to check for reusable credentials and refresh settings on existing remote credentials.
- Enhanced the `seed_civitai` function to implement caching for model jobs, optimizing the provisioning process.
- Updated the installation script for Ollama to prevent unnecessary restarts when the service configuration has not changed.
- Added diagnostics for model job caching and improved error handling in various functions.
2026-08-21 11:22:14 +03:00
Leonid Pershin d3d689052d Enhance backend management and diagnostics in install_swarm_comfy.py
- Introduced a new `delete_backend` function to facilitate backend removal during recovery processes.
- Improved the `recover_errored_backends` function to handle backend reconfiguration and recreation more effectively, including enhanced logging for diagnostics.
- Added a new `add_comfy_selfstart` function to streamline the addition of new backends.
- Updated the `comfy_start_script` function to prefer absolute paths for better reliability.
- Enhanced diagnostics in `swarm_diag.py` to include detailed backend settings and mount status.
- Added tests to validate the new backend management features and ensure robust error handling.
2026-08-21 11:12:20 +03:00
Leonid Pershin a18074c985 Enhance backend idle management and diagnostics in SwarmUI
- Updated the `wait_backend_idle` function to handle disabled backends, introducing a new failure condition and diagnostics collection for better error handling.
- Refactored the `install_swarm_comfy` script to include a new `configure_comfy_backend` function, streamlining backend configuration and enabling better management of backend states.
- Added tests to validate the new functionality for handling disabled backends and ensuring robust diagnostics, improving overall backend management.
2026-08-21 11:00:01 +03:00
Leonid Pershin f8bbde8ac0 Enhance backend recovery and diagnostics in installation and tuning scripts
- Improved the `install_swarm_comfy` function to handle empty backend states more effectively, introducing recovery mechanisms and enhanced logging for better visibility.
- Updated the `tune_swarm_perf` function to always sanitize backend FDS corruption, ensuring consistent performance tuning.
- Added new tests to validate the functionality of backend recovery and FDS sanitization, ensuring robustness in backend management.
2026-08-21 10:54:02 +03:00
Leonid Pershin ef743a6e6d Add file size conversion and enhance Civitai job processing
- Introduced the `file_size_bytes` function to convert Civitai model sizes from kilobytes to bytes, improving data handling.
- Updated the `seed_civitai` function to include file size in job definitions, enhancing model processing efficiency.
- Enhanced the `should_skip` function to utilize expected size for faster decision-making during job processing.
- Added tests for new functionality, ensuring robustness in file size handling and job processing logic.
2026-08-21 10:52:44 +03:00
Leonid Pershin 6cdd6ecfa1 Add support for Gitea and Forgejo in token handling
- Enhanced the `with_token` function to support Gitea and Forgejo URLs by constructing the appropriate authentication format for generic HTTPS.
- Updated tests to validate the new functionality, ensuring correct token injection for Gitea URLs while maintaining existing behavior for GitHub and GitLab.
- Improved overall robustness of token handling across different platforms.
2026-08-21 10:45:54 +03:00
Leonid Pershin 506369548c Add preview image handling for Civitai models and enhance job processing
- Introduced the `pick_preview_image` function to extract the first usable preview image URL and its suffix from model version data.
- Updated the `seed_civitai` function to include preview image URLs and destinations in job definitions, improving model handling.
- Implemented the `ensure_preview` function to download missing preview images during job processing, enhancing user experience.
- Added tests for `pick_preview_image` to ensure correct functionality across various scenarios, ensuring robustness in image handling.
2026-08-21 10:44:52 +03:00
Leonid Pershin dd0ffbf69b Refactor bootstrap script for SwarmUI management and enhance error handling
- Introduced functions `swarm_git_ok`, `clone_swarmui`, and `update_swarmui` to streamline the cloning and updating process of SwarmUI.
- Improved error handling during the update process, ensuring a fallback to cloning if the update fails.
- Enhanced logging messages for better visibility during cloning and updating operations.
- Updated tests to verify the presence of new functions and logging messages in the bootstrap script.
2026-08-21 10:27:25 +03:00
Leonid Pershin 9e63c0722e Enhance bootstrap script for .NET installation and error handling
- Added `wget` to the package installation list for improved script functionality.
- Implemented a fallback mechanism using `curl` for .NET installation if the primary script fails, enhancing robustness.
- Updated ownership change for the installation directory to ensure proper permissions for the user.
- Enhanced logging for error scenarios during .NET installation, providing clearer feedback for troubleshooting.
- Added tests to verify the new fallback functionality and ownership changes in the bootstrap script.
2026-08-21 10:23:35 +03:00
Leonid Pershin ec4663c04f Add diagnostics command and enhance error handling for backend states
- Introduced a new CLI command `diag` to collect diagnostics from SwarmUI/Comfy, including API, journal, and paths.
- Enhanced the `ensure_swarm_comfy_installed` function to include diagnostic script handling for errored backends.
- Updated `wait_backend_idle` to trigger diagnostics when backends are in an errored state, improving error recovery.
- Implemented fallback mechanisms for diagnostics in the `run_diagnostics` function, ensuring better visibility into backend issues.
- Added tests to validate the new diagnostic functionality and error handling, ensuring robustness in backend management.
2026-08-21 10:17:47 +03:00
Leonid Pershin 1785ab369c Refactor backend status handling and improve idle management
- Updated the idle-killer logic to treat SwarmUI `empty` and `disabled` states as busy, preventing unnecessary idle time during provisioning.
- Enhanced the `wait_backend_idle` function to recognize suspended backends as ready, improving resource utilization and user feedback.
- Refined the `install_swarm_comfy` script to skip installation when backends are already present, streamlining the setup process.
- Improved the `resolve_llm_runtime` function to prioritize live configuration over stale state notes, ensuring accurate runtime detection.
- Added tests to validate the new backend status handling and idle management logic, ensuring robustness and reliability.
2026-08-21 10:07:16 +03:00
Leonid Pershin 26f3be6e96 Refactor ComfyUI installation script to improve Python environment handling
- Replaced direct calls to `venv/bin/pip` with `python -m pip` to avoid execution errors on network mounts and improve compatibility.
- Introduced a new function `find_comfy_python` to locate the appropriate Python executable for ComfyUI installations.
- Updated the `pip_install_sage` function to utilize the new Python handling, enhancing installation reliability.
- Added tests to verify the new behavior of Python environment detection and installation processes, ensuring robustness.
2026-08-21 10:01:42 +03:00
Leonid Pershin 3e0a51cac4 Update backend status handling and improve user notifications
- Enhanced documentation to clarify the transition from 'Idle' to 'ready (running)' for backend states, improving user understanding of system readiness.
- Updated logging messages in the notification system to reflect the new backend status terminology, ensuring accurate feedback during operations.
- Refined access link collection logic to better handle tunneled and non-tunneled scenarios, enhancing user experience.
- Improved tests to validate the new backend status handling and ensure accurate reporting of access links and notifications.
2026-08-21 09:53:48 +03:00
Leonid Pershin 281ae15b12 Enhance access link collection and backend status reporting
- Updated the `collect_access_links` function to provide clearer user-facing endpoint labels and notes, particularly for non-tunneled scenarios.
- Improved logging messages in the provisioning process to reflect the status of the SwarmUI and Ollama API, enhancing user feedback during setup.
- Added human-readable status messages for backend loading and running states, improving clarity during the waiting process.
- Updated tests to verify the new behavior and ensure accurate reporting of access links and backend statuses.
2026-08-21 09:34:13 +03:00
Leonid Pershin a622265bb5 Enhance ComfyUI installation script with progress tracking and status detection
- Added functions for formatting byte sizes, displaying progress bars, and calculating directory sizes to improve user feedback during installation.
- Implemented a stage detection mechanism to provide real-time updates on the installation process of ComfyUI.
- Enhanced logging to capture recent journal lines related to ComfyUI installation, improving visibility into the installation status.
- Updated tests to verify the presence of new functionality in the installation script, ensuring robustness and reliability.
2026-08-21 09:28:45 +03:00
Leonid Pershin f7ba915e74 Implement headless ComfyUI installation and improve backend status handling
- Added a new function to ensure headless installation of ComfyUI when backends are empty, enhancing the setup process for SwarmUI.
- Updated documentation to clarify the installation flow and backend readiness checks, ensuring users understand the requirements for a successful setup.
- Enhanced backend status checks to differentiate between 'empty' and 'idle' states, improving error handling and user feedback during provisioning.
- Adjusted logging messages to provide clearer insights into the installation and backend status processes.
2026-08-21 09:18:59 +03:00
Leonid Pershin 97abc7985e Update configuration and environment probing for improved flexibility and compatibility
- Modified the `load_config` function to allow launch preferences in `gpu-rent.vars` to override `.env` settings for non-secret variables, enhancing user control.
- Updated the list of Python candidates in `stack_env_probe.py` to include additional paths for ComfyUI, improving the detection of Python environments.
- Added new pip candidates in `tune_swarm_perf.py` to support various ComfyUI installations, ensuring better compatibility with different setups.
2026-08-21 09:06:27 +03:00
Leonid Pershin 69daf81a43 Refactor GPU environment verification and SSH execution for improved flexibility
- Removed the direct injection of environment variables into the script, preventing issues with `from __future__` imports.
- Updated the `run_python` function to accept an `env` parameter for passing runtime environment variables, enhancing script execution control.
- Adjusted tests to verify the new behavior, ensuring that environment variables are correctly set without modifying the script content.
2026-08-21 09:02:07 +03:00
Leonid Pershin f17b1c9731 Update Ollama model configurations and documentation for clarity and consistency
- Revised model descriptions in `ollama-models.example.yaml` to emphasize uncensored and abliterated requirements, enhancing user understanding.
- Updated documentation in `llm.md` to reflect changes in model tags and their meanings, ensuring accurate guidance for users.
- Modified CLI help messages to clarify the nature of presets, reinforcing that all options are abliterate models with Russian support.
- Enhanced the `llm_runtime.py` file to align preset labels with the updated model descriptions, improving consistency across the codebase.
2026-08-21 08:54:21 +03:00
Leonid Pershin 2ab32a8ab5 Refactor LLM configuration to remove llamacpp support
- Removed references to llamacpp from configuration files, scripts, and documentation, streamlining the LLM setup process to focus solely on Ollama.
- Updated environment variables and paths to eliminate llamacpp-related entries, ensuring clarity in the configuration.
- Adjusted CLI commands and help messages to reflect the removal of llamacpp, enhancing user experience and reducing confusion.
- Revised documentation to provide clear guidance on using Ollama exclusively, including updates to setup instructions and runtime options.
2026-08-21 08:51:36 +03:00
Leonid Pershin 9a4b87dc06 Update idle time configuration to improve resource management
- Reduced default values for IDLE_MINUTES from 60 to 30 and IDLE_GRACE_MINUTES from 90 to 45 across configuration files and documentation.
- Updated related documentation to reflect the new default idle time settings, ensuring consistency in user guidance and system behavior.
2026-08-21 08:35:43 +03:00
Leonid Pershin 6871c511c4 Implement UP_STOP_ON_FAIL option to manage GPU state on installation failure
- Added a new configuration option `UP_STOP_ON_FAIL` to control whether the GPU should be stopped automatically if the `up` command fails, enhancing user control over resource management.
- Updated the CLI to include a `--keep-on-fail` flag, allowing users to prevent GPU shutdown during installation errors.
- Enhanced the installation scripts and documentation to reflect these changes, providing clearer guidance on the new behavior and configuration options.
- Improved error handling in the CLI to ensure proper cleanup of resources in case of failure, preventing unexpected billing for unused GPU resources.
2026-08-21 08:32:33 +03:00
Leonid Pershin 5081a6bc1e Refactor installation script for improved archive handling and error logging
- Introduced a new variable to determine the type of archive being processed, enhancing the logic for handling different file types.
- Updated the installation process to ensure proper extraction of both zip and tar files, improving compatibility with various archive formats.
- Enhanced logging to provide clearer feedback on the type of archive being processed, aiding in troubleshooting.
- Added error handling to ensure the installation process returns a failure status if the archive does not contain the expected binaries.
2026-08-21 08:22:17 +03:00
Leonid Pershin 91d2ce0fab Enhance LLM configuration and installation scripts for improved flexibility
- Added new environment variables in `env.example` and `gpu-rent.vars.example` for fine-tuning LLM settings, including CUDA build options and model version pinning.
- Updated `llm.md` documentation to include detailed descriptions of new configuration options and usage cases for LLM setups.
- Enhanced the `provision.py` script to forward new environment variables during remote installations, improving the installation process for LLM components.
- Modified the `install_llamacpp.sh` script to support conditional CUDA builds and asset URL overrides, ensuring better compatibility with various environments.
- Improved logging in the installation scripts to provide clearer feedback during the setup process.
2026-08-21 08:19:37 +03:00
Leonid Pershin ccba40a228 Enhance logging and timing in CLI and session operations
- Updated the `_print_checks` function to replace console prints with logging functions for better traceability.
- Introduced timing functionality in the `doctor`, `dry_run`, and `up` functions to log the duration of preflight checks.
- Modified the `wait_ssh` function to accept a logging callback, improving SSH wait feedback.
- Enhanced the `mark` method in `PhaseTimes` to log phase durations, aiding in performance analysis.
- Updated various remote scripts to ensure error messages are printed to stderr for better error handling.
2026-08-21 08:03:04 +03:00
Leonid Pershin 7756d0d4df Enhance logging in CLI preflight checks
- Added logging statements to the `doctor`, `dry_run`, and `up` functions to indicate the start of preflight checks, improving user feedback during execution.
- Ensured consistent logging messages across different functions to enhance traceability and debugging capabilities.
2026-08-21 07:52:52 +03:00
Leonid Pershin 242f5b7c89 Enhance LLM runtime and installation script for Linux support
- Added a new function `pick_llamacpp_linux_asset_url` to select appropriate Linux release assets, prioritizing Ubuntu CUDA and Vulkan options while excluding Windows and macOS binaries.
- Updated the installation script to build `llama-server` from source when Linux CUDA binaries are unavailable, improving compatibility and flexibility.
- Revised documentation to reflect changes in asset handling and installation procedures.
- Added tests to validate the new asset selection logic, ensuring correct behavior in various scenarios.
2026-08-21 07:51:17 +03:00
Leonid Pershin 15b95f04c7 Update model configurations and enhance LLM runtime logic
- Revised model URLs and descriptions in `llamacpp-models.example.yaml` and `ollama-models.example.yaml` to reflect new recommendations and vision capabilities.
- Updated the LLM runtime logic to support vision projectors and improved model resolution handling.
- Enhanced the installation script to conditionally include vision projectors when available.
- Added tests to validate the inclusion of vision projectors in model presets and ensure proper URL remapping for deprecated models.
- Improved documentation to clarify model usage and configuration options.
2026-08-21 07:40:47 +03:00
Leonid Pershin 618e6e4806 Add Hugging Face support and enhance model resolution logic
- Introduced support for Hugging Face API integration, allowing fallback model resolution when Civitai fails.
- Updated configuration to include `HF_TOKEN` and `HF_TOKEN_PATH` for authentication.
- Enhanced model capture logic to differentiate between Civitai and Hugging Face sources.
- Improved error handling for model downloads, providing clearer messages for authentication issues.
- Updated documentation to reflect new environment variables and usage instructions for Hugging Face integration.
- Added tests to validate the new fallback mechanism and ensure robust model resolution.
2026-08-21 07:34:15 +03:00
Leonid Pershin 7343fb0e83 Update idle time configuration and documentation
- Increased default values for IDLE_MINUTES from 30 to 60 and IDLE_GRACE_MINUTES from 45 to 90 across configuration files and documentation.
- Updated related documentation to reflect the new default idle time settings, ensuring consistency in user guidance and system behavior.
2026-08-21 07:24:09 +03:00
Leonid Pershin 000661e04f Refactor .NET installation logic in bootstrap script
- Changed the check for the existence of the .NET installation script to verify if the file exists instead of checking for execution permissions.
- Updated the command to run the .NET installation script from the repository root to ensure proper execution context.
- Added error handling to log a warning if the installation script fails and an error message if .NET is still not installed after the attempt, preventing SwarmUI from starting.
- Enhanced logging to confirm successful .NET installation, improving user feedback during the bootstrap process.
2026-08-21 07:22:01 +03:00
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
Leonid Pershin 4186d0bcf1 Add download progress tracking and byte formatting utilities
- Introduced `fmt_bytes` function for human-readable byte size formatting.
- Added `DownloadProgress` class to track and display download progress with speed and completion percentage.
- Updated `download` functions in `civitai_fetch.py` and `llamacpp_fetch.py` to utilize progress tracking.
- Enhanced `ollama_pull.py` to support streaming progress updates during model pulls.
- Updated tests to validate new formatting and progress tracking functionalities, ensuring accurate output and user feedback.
2026-08-21 07:16:04 +03:00
Leonid Pershin adba4976ee Enhance SwarmUI integration and GPU environment verification
- Updated CLI documentation to reflect the new handling of `CIVITAI_API_TOKEN`, which is now automatically passed to SwarmUI user settings during startup.
- Improved the `render_access_panel` function to include additional warnings for idle-killer failures and stack errors, enhancing user feedback.
- Introduced a new function `seed_swarmui_api_keys` to manage API key injection into SwarmUI, ensuring seamless integration with the Model Downloader.
- Enhanced GPU environment verification logic to include fail-fast checks for critical components like CUDA, improving error handling and user notifications.
- Updated tests to validate the new API key handling and access panel behavior, ensuring robustness in the integration process.
2026-08-21 07:09:20 +03:00
Leonid Pershin 1ec615c03e Implement idle-killer enhancements and swarm management improvements
- Marked critical bugs as resolved in the review documentation, including changes to the `arm_idle_killer` function to raise errors on credential creation failures and ensure proper file permissions for JSON credentials.
- Introduced a new `_try_arm_idle_killer` function in `provision.py` to manage idle-killer state more effectively, ensuring it arms correctly during provisioning.
- Updated the `swarm_busy` function in `remote/idle_killer.py` to allow idle state after a specified duration of Swarm unavailability, preventing unnecessary billing.
- Enhanced performance tuning logic in `tune_swarm_perf.py` to ensure proper handling of pip installation success before applying extra arguments.
- Added tests to validate the new idle-killer behavior and swarm management logic, ensuring robustness in handling idle states and error conditions.
2026-08-21 07:04:09 +03:00
Leonid Pershin d409e2e154 Refactor GPU environment verification tests and update CLI documentation
- Rearranged the order of verification steps in the CLI documentation for clarity.
- Enhanced the `test_verify_gpu_env` tests to improve logging and error assertions, ensuring accurate feedback on GPU stack checks.
- Added a new test to skip the torch requirement when only LLM is enabled, reflecting updated behavior in GPU environment verification.
2026-08-21 07:00:19 +03:00
Leonid Pershin 3c8225a69e Implement GPU environment verification in session management
- Added a new function `verify_gpu_env` to check GPU stack readiness, including nvidia-smi, CUDA, and torch in the Comfy virtual environment when SwarmUI is enabled.
- Updated the session management to call `verify_gpu_env`, capturing GPU environment status and errors in the state notes.
- Enhanced documentation in `cli.md` to reflect the new GPU environment verification process.
- Added tests for `verify_gpu_env` to ensure proper functionality and error handling during GPU checks.
2026-08-21 06:58:23 +03:00
Leonid Pershin 09b7c36f3b Implement balance monitoring and notification for Selectel API integration
- Added support for balance tracking using `SELECTEL_API_TOKEN` in the configuration.
- Introduced new balance notification logic in the local watchdog, alerting users on balance changes based on defined thresholds.
- Updated documentation to include instructions for setting up balance notifications and the required environment variables.
- Enhanced the `ready` and `session` modules to initialize balance state and handle notifications during GPU operations.
- Refactored the CLI and related components to support the new balance monitoring features, ensuring a seamless user experience.
2026-08-21 06:52:51 +03:00
Leonid Pershin 7ed6a99df2 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.
2026-08-21 06:44:50 +03:00
Leonid Pershin f93ac5a66a Refactor access card printing and update test assertions
- Replaced deprecated console usage in `print_access_card` with a new console import for improved output handling.
- Updated test assertions in `test_pools.py` and `test_prompts.py` for better clarity and accuracy in expected results.
2026-08-21 06:34:45 +03:00
Leonid Pershin e7784473a2 Refactor CLI and LLM runtime handling for improved user experience
- Removed deprecated console usage in favor of structured logging functions for error handling and user prompts.
- Enhanced CLI prompts for LLM runtime and preset selection, utilizing menu helpers for better user interaction.
- Updated GPU pool scanning output with improved formatting and error indication for clarity.
- Refactored setup wizard to streamline LLM runtime and preset configuration, ensuring a more intuitive setup process.
- Improved documentation and user feedback in CLI outputs to enhance overall usability.
2026-08-21 06:31:15 +03:00
Leonid Pershin 64f93b4bf6 Update LLM support for llama.cpp and enhance configuration management
- Added support for `llamacpp-models.yaml` in `.gitignore` and implemented logic to copy it in `gpu-rent.ps1` and `gpu-rent.sh`.
- Enhanced CLI to prompt for llama.cpp model presets during setup and execution, improving user experience.
- Updated configuration handling to include `llamacpp_models_manifest` and related functions for managing llama.cpp models.
- Improved documentation in `cli.md` and `llm.md` to reflect changes in llama.cpp integration and model management.
- Refactored provisioning logic to handle llama.cpp model downloads and configurations effectively.
2026-08-21 06:25:12 +03:00
Leonid Pershin 2ccb03f7d2 Enhance GPU probing and performance tuning in provisioning
- Introduced GPU probing functionality to gather and store GPU specifications in `/mnt/swarm_data/.gpu-rent-gpu.json`, aiding in performance tuning.
- Updated `install_ollama.sh` and `install_llamacpp.sh` to utilize GPU information for configuring optimal runtime parameters.
- Enhanced `provision.py` to include GPU probing and performance tuning logic, ensuring better resource allocation for LLM operations.
- Improved documentation in `decisions.md`, `llm.md`, and `swarmui.md` to reflect changes in GPU handling and performance tuning processes.
- Added new tests to validate the GPU probing and model resolution logic, ensuring robustness in handling various GPU configurations.
2026-08-21 06:10:24 +03:00
Leonid Pershin 603165a4ba Enhance CLI and documentation for capturing VM inventory
- Introduced new `capture` commands in the CLI to allow users to merge VM inventory into local manifests without downloading weights.
- Updated `README.md` and `cli.md` to include detailed instructions for the new capture functionality, including options for models and extensions.
- Enhanced `decisions.md` to clarify the role of captured links in the manifest files.
- Improved `extensions.md` to document the process of capturing installed extensions back to the local configuration.
- Added new functions in `civitai.py` to support fetching model versions by hash and generating canonical URLs for models.
2026-08-21 05:56:52 +03:00
Leonid Pershin 71f4e4c2e3 Update extensions and documentation for LLM integration and CLI enhancements
- Added support for a new extension, `swarm-assistent`, in `extensions.example.yaml` with a requirement for `ollama`.
- Enhanced the README.md to clarify the setup process and provide a quick start guide for using extensions.
- Updated documentation in `llm.md` to reflect the opt-in nature of LLM support and provide clearer instructions for enabling it.
- Improved the `autocomplete.md` to detail the automatic setup of word lists during the initial launch.
- Revised `cli.md` to include new commands and options related to LLM runtime handling and extension management.
- Enhanced the `spike-notes.md` to guide users through the first live run with a focus on LLM integration.
2026-08-21 05:49:34 +03:00
Leonid Pershin dc1fde9e3e Refactor LLM runtime handling and enhance CLI documentation
- Updated `resolve_llm_runtime` to prioritize live configuration over legacy notes, ensuring accurate runtime resolution.
- Enhanced `tunnel_forwards` to prefer current configuration for LLM runtime, improving tunnel setup logic.
- Improved idle-killer logic to handle stale markers and provide clearer warnings in the status output.
- Updated CLI documentation in `cli.md` to reflect changes in command behavior and runtime handling.
- Enhanced tests to validate new runtime resolution logic and ensure proper handling of configuration states.
2026-08-21 05:40:22 +03:00
Leonid Pershin 82e36129cd Refactor access card handling and update CLI output for tunnel operations
- Integrated `print_access_card` functionality into the `up` command for both tunneled and non-tunneled scenarios.
- Removed the deprecated `print_mcp_snippet` function from the session management flow.
- Updated the `tunnel_forwards` function to streamline port handling for LLM runtimes.
- Enhanced test cases to reflect changes in access card printing and MCP snippet logging.
2026-08-21 05:34:09 +03:00
Leonid Pershin 2005b00175 Update configuration and documentation for LLM support and local watchdog
- Added `ollama-models.yaml` to .gitignore and implemented logic to copy it in gpu-rent.ps1 and gpu-rent.sh.
- Enhanced env.example to include new variables for LLM runtime options and local watchdog configuration.
- Updated CLI commands to support LLM options during setup and execution, including new flags for Ollama and llama.cpp.
- Improved documentation in cli.md and README.md to reflect changes in LLM integration and local watchdog functionality.
- Adjusted architecture and decisions documentation to clarify the role of LLMs and local watchdog in the system.
2026-08-21 05:29:23 +03:00
Leonid Pershin a9cf2e0f90 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.
2026-08-21 05:01:53 +03:00
Leonid Pershin ec42830579 Update README and CLI documentation for tunnel functionality
- Enhanced README.md to clarify the `gpu-rent up` command, including default tunnel behavior and options for cloud-only operation.
- Updated cli.md to reflect changes in the `gpu-rent up` command, detailing the new `--no-tunnel` option and its implications.
- Revised decisions.md to explain the separation of `up` and `tunnel` commands, emphasizing the default tunnel opening after `up`.
- Improved doctor.py to provide clearer instructions regarding tunnel creation and cloud-only usage.
- Adjusted notify.py to reflect the updated command usage for accessing the SwarmUI.
2026-08-21 04:43:33 +03:00
Leonid Pershin c7a56bdd56 Enhance SSH handling in session management
- Introduced `probe_ssh` function for quick SSH checks, improving the handling of server bootstrap scenarios.
- Updated `cmd_up` to utilize `probe_ssh`, enhancing the logic for managing server states based on SSH availability.
- Improved logging for server state transitions and error handling during SSH connection attempts.
- Adjusted timeout settings in `wait_ssh` for better performance and reliability in SSH key acceptance checks.
2026-08-21 04:37:09 +03:00
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
Leonid Pershin d6d247875b Enhance SSH configuration and security group management
- Added optional SSH security-group CIDR configuration in `env.example` to allow broader access if needed.
- Improved `guess_operator_cidr` function to support multiple IP retrieval services and allow overriding CIDR via environment variable.
- Refactored security group management to ensure idempotency and proper logging of security group rules.
- Introduced helper function `_get_volume_or_none` for better volume management and error handling.
- Updated `wait_ssh` function to enhance SSH connection handling with improved timeout settings and logging.
- Added state reset logic in `cmd_up` to handle scenarios where the server is not found in the cloud.
2026-08-21 04:12:38 +03:00
Leonid Pershin 28019d1d09 Enhance GPU flavor scanning and update documentation
- Introduced SCAN_POOLS configuration to specify pools for GPU flavor scanning.
- Updated the `flavors` command to scan specified pools and list available GPU flavors based on `FLAVOR_PREFERENCE`.
- Revised CLI documentation to reflect changes in the `flavors` command behavior.
- Enhanced decision documentation to include details about GPU pool scanning.
- Updated setup instructions to guide users on selecting appropriate GPU pools.
2026-08-21 04:03:28 +03:00
Leonid Pershin a563ae06c4 Bump version to 0.2.0 and enhance documentation
- Updated version number in pyproject.toml and __init__.py to 0.2.0.
- Revised README.md to reflect the current state of the project, including usage instructions and setup steps.
- Improved CLI documentation in cli.md, adding details about new commands and their functionalities.
- Enhanced the quick start section in README.md for better clarity on initial setup.
- Updated local folder documentation to clarify file handling and commands.
- Added a new command for listing GPU flavors and improved error handling in the CLI.
- Implemented a watchdog feature in the tunnel to manage server states effectively.
2026-08-21 03:38:01 +03:00
Leonid Pershin 343f741baa Refactor environment and configuration management
- Updated the project structure to store configuration files (.env, models.yaml, extensions.yaml) in the project root instead of the user's home directory.
- Enhanced the setup process to automatically copy example files to the project root on first run.
- Implemented a migration function to transfer legacy configuration files from the user's home directory to the new project structure.
- Revised documentation to reflect changes in file locations and setup instructions.
- Improved code readability and maintainability by refactoring path management functions.
2026-08-21 03:20:18 +03:00
Leonid Pershin c2ca39a4a7 Update CLI and roadmap documentation; clean up code
- Revised CLI documentation to clarify the sequence of operations for the `up` command and updated the status of features.
- Enhanced the roadmap with completed tasks marked as done.
- Removed unused import in clone_ext.py for cleaner code.
- Added assertions in test_bootstrap.py to ensure correct script generation and validate the presence of autocompletion data.
2026-08-21 03:13:31 +03:00
Leonid Pershin 615cf81493 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.
2026-08-21 03:06:51 +03:00
Leonid Pershin 167d07a733 first commit 2026-08-21 02:42:48 +03:00