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.
This commit is contained in:
@@ -1,27 +1,21 @@
|
||||
from types import SimpleNamespace
|
||||
|
||||
from gpu_rent.provision import _LLAMACPP_INSTALL_ENV, _remote_llm_env
|
||||
from gpu_rent.provision import _OLLAMA_INSTALL_ENV, _remote_llm_env
|
||||
|
||||
|
||||
def test_remote_llm_env_forwards_llamacpp_vars(monkeypatch):
|
||||
monkeypatch.setenv("LLAMACPP_TAG", "b10545")
|
||||
monkeypatch.setenv("LLAMACPP_BUILD_CUDA", "1")
|
||||
monkeypatch.setenv("LLAMACPP_NGL", "40")
|
||||
monkeypatch.setenv("LLAMACPP_ASSET_URL", "https://example/a.tar.gz")
|
||||
monkeypatch.delenv("LLAMACPP_SHA256", raising=False)
|
||||
def test_remote_llm_env_forwards_ollama_vars(monkeypatch):
|
||||
monkeypatch.setenv("OLLAMA_VERSION", "0.6.5")
|
||||
monkeypatch.setenv("OLLAMA_SHA256", "abc123")
|
||||
cfg = SimpleNamespace(ssh_user="ubuntu")
|
||||
env = _remote_llm_env(cfg, *_LLAMACPP_INSTALL_ENV)
|
||||
env = _remote_llm_env(cfg, *_OLLAMA_INSTALL_ENV)
|
||||
assert env["SWARM_USER"] == "ubuntu"
|
||||
assert env["LLAMACPP_TAG"] == "b10545"
|
||||
assert env["LLAMACPP_BUILD_CUDA"] == "1"
|
||||
assert env["LLAMACPP_NGL"] == "40"
|
||||
assert env["LLAMACPP_ASSET_URL"] == "https://example/a.tar.gz"
|
||||
assert "LLAMACPP_SHA256" not in env
|
||||
assert env["OLLAMA_VERSION"] == "0.6.5"
|
||||
assert env["OLLAMA_SHA256"] == "abc123"
|
||||
|
||||
|
||||
def test_remote_llm_env_skips_empty(monkeypatch):
|
||||
for key in _LLAMACPP_INSTALL_ENV:
|
||||
for key in _OLLAMA_INSTALL_ENV:
|
||||
monkeypatch.delenv(key, raising=False)
|
||||
cfg = SimpleNamespace(ssh_user="ubuntu")
|
||||
env = _remote_llm_env(cfg, *_LLAMACPP_INSTALL_ENV)
|
||||
env = _remote_llm_env(cfg, *_OLLAMA_INSTALL_ENV)
|
||||
assert env == {"SWARM_USER": "ubuntu"}
|
||||
|
||||
Reference in New Issue
Block a user