diff --git a/oci/catalog/overlays/ollama.json b/oci/catalog/overlays/ollama.json index a8869d25..5356b4c6 100644 --- a/oci/catalog/overlays/ollama.json +++ b/oci/catalog/overlays/ollama.json @@ -1,4 +1,23 @@ { + "catalog_ui": { + "description": { + "en_US": "Ollama runs large language models locally through a command-line interface and an HTTP API. The Ollama server does not include an interactive Web UI; pair it with a frontend such as Open WebUI if you want browser-based chat.\n\nIt supports many models, including Llama, Mistral, Gemma, and Qwen, and provides an API for applications and integrations. Local models run on your own hardware; cloud models require an internet connection.\n\n**Key Features:**\n- **Local model execution**: Run supported models on your own hardware\n- **Model management**: Pull, run, and manage models with the CLI or API\n- **API integration**: Connect other applications to the Ollama server\n- **Privacy options**: Keep inference local when using local models\n\n**Learn More:**\n- [Ollama Official Website](https://ollama.com/)\n- [Ollama GitHub Repository](https://github.com/ollama/ollama)\n- [Model Library](https://ollama.com/library)\n" + }, + "launch": { + "path": "/api/version" + } + }, + "first_run": { + "endpoints": [ + { + "label": "Ollama API (no Web UI)", + "scheme": "http", + "port": 11434, + "path": "/api/version", + "source": "ollama-http-api" + } + ] + }, "proxmox": { "deployment_profile": { "variant": "hardware-selectable", diff --git a/oci/tests/test_catalog_web_links.py b/oci/tests/test_catalog_web_links.py index 324d7a05..e05b2e9b 100644 --- a/oci/tests/test_catalog_web_links.py +++ b/oci/tests/test_catalog_web_links.py @@ -56,6 +56,24 @@ class CatalogWebLinks(unittest.TestCase): self.assertEqual((check["scheme"], check["port"]), ("http", 9696)) self.assertNotIn("accept_non_http", check) + def test_ollama_links_to_its_api_instead_of_claiming_a_web_ui(self): + template = self.catalog.compose("ollama") + launch = template["catalog_ui"]["launch"] + self.assertEqual(launch, {"scheme": "http", "port": 11434, "path": "/api/version"}) + endpoint = template["first_run"]["endpoints"][0] + self.assertEqual(endpoint["label"], "Ollama API (no Web UI)") + self.assertEqual({key: endpoint[key] for key in launch}, launch) + self.assertEqual(endpoint["source"], "ollama-http-api") + self.assertNotIn("Web interface", template["catalog_ui"]["description"]["en_US"]) + self.assertIn("does not include an interactive Web UI", + template["catalog_ui"]["description"]["en_US"]) + check = transaction.effective_healthcheck(template) + self.assertEqual((check["scheme"], check["port"], check["path"]), + ("http", 11434, "/api/version")) + notes = oci_description.render(template, "", "ollama", "192.0.2.10") + self.assertIn('href="http://192.0.2.10:11434/api/version"', notes) + self.assertIn("Ollama API (no Web UI)", notes) + @patch("proxmenux_oci.installer.host.gpus", return_value={"intel": [], "amd": [], "nvidia": False}) @patch("proxmenux_oci.i18n.language", return_value="en") @patch("proxmenux_oci.installer.host.storages", side_effect=storages)