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.
This commit is contained in:
Leonid Pershin
2026-08-21 14:20:06 +03:00
parent f437cd0373
commit 5832c5cf75
14 changed files with 626 additions and 54 deletions
+3
View File
@@ -17,6 +17,9 @@ def test_bootstrap_script_is_native_swarmui():
assert "GPU_RENT_BOOTSTRAP_LIGHT" in script
assert "GPU_RENT_SKIP_SWARMUI" in script
assert "light bootstrap — пропускаем apt-get" in script
assert "python3.12-dev" in script
assert "TRITON_CACHE_DIR" in script
assert "ensure_triton_build_deps" in script
# llm-only re-up can skip apt when data marker exists (not only Swarm boot marker)
assert 'MARKER_DATA' in script or ".gpu-rent-ready" in script
# .NET: chown before Swarm install script; curl fallback if wget/perms fail