fix: distinguish external cookbook runtimes (#1188)
This commit is contained in:
@@ -15,6 +15,7 @@ from routes.shell_routes import (
|
||||
_running_in_container,
|
||||
_docker_row_status,
|
||||
_package_installed_from_probe,
|
||||
_package_pip_update_status,
|
||||
_package_probe_script,
|
||||
_package_status_note,
|
||||
_prepend_user_install_bins_to_path,
|
||||
@@ -224,6 +225,21 @@ class TestPackageProbeStatus:
|
||||
}
|
||||
|
||||
assert _package_installed_from_probe("vllm", probe) is True
|
||||
assert "python package: vllm 0.8.5" in _package_status_note("vllm", probe)
|
||||
assert _package_pip_update_status({"name": "vllm", "pip": "vllm"}, probe).available is True
|
||||
|
||||
def test_vllm_cli_without_dist_is_external_for_update(self):
|
||||
probe = {
|
||||
"modules": {"vllm": {"found": False, "real_module": False}},
|
||||
"dists": {},
|
||||
"binaries": {"vllm": "/opt/vllm/bin/vllm"},
|
||||
}
|
||||
|
||||
status = _package_pip_update_status({"name": "vllm", "pip": "vllm"}, probe)
|
||||
|
||||
assert _package_installed_from_probe("vllm", probe) is True
|
||||
assert status.available is False
|
||||
assert "outside Odysseus" in status.note
|
||||
|
||||
def test_llama_cpp_is_installed_when_native_llama_server_exists(self):
|
||||
probe = {
|
||||
@@ -234,6 +250,9 @@ class TestPackageProbeStatus:
|
||||
|
||||
assert _package_installed_from_probe("llama_cpp", probe) is True
|
||||
assert "native llama-server" in _package_status_note("llama_cpp", probe)
|
||||
status = _package_pip_update_status({"name": "llama_cpp", "pip": "llama-cpp-python[server]"}, probe)
|
||||
assert status.available is False
|
||||
assert "package manager or source checkout" in status.note
|
||||
|
||||
def test_diffusers_requires_torch_too(self):
|
||||
missing_torch = {
|
||||
|
||||
Reference in New Issue
Block a user