From fb47cc09318236ac5d8c172fc1b1de888c952d6c Mon Sep 17 00:00:00 2001 From: Raghotham Murthy Date: Wed, 28 May 2025 17:09:10 -0700 Subject: [PATCH] uv ness --- llama_stack/templates/dependencies.json | 10 ---------- llama_stack/templates/ollama/build.yaml | 26 +++++++++++++++++-------- pyproject.toml | 6 ++++++ uv.lock | 8 ++++++++ 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/llama_stack/templates/dependencies.json b/llama_stack/templates/dependencies.json index 78da0603b..d608ce877 100644 --- a/llama_stack/templates/dependencies.json +++ b/llama_stack/templates/dependencies.json @@ -432,11 +432,9 @@ "ollama": [ "aiohttp", "aiosqlite", - "autoevals", "blobfile", "chardet", "chromadb-client", - "datasets", "emoji", "faiss-cpu", "fastapi", @@ -446,27 +444,19 @@ "matplotlib", "mcp", "nltk", - "numpy", "ollama", "openai", "opentelemetry-exporter-otlp-proto-http", "opentelemetry-sdk", - "pandas", "peft", "pillow", "psycopg2-binary", "pymongo", "pypdf", "pythainlp", - "redis", "requests", - "scikit-learn", - "scipy", - "sentencepiece", "sqlalchemy[asyncio]", - "torch", "tqdm", - "transformers", "tree_sitter", "trl", "uvicorn" diff --git a/llama_stack/templates/ollama/build.yaml b/llama_stack/templates/ollama/build.yaml index 9d8ba3a1e..b8553427d 100644 --- a/llama_stack/templates/ollama/build.yaml +++ b/llama_stack/templates/ollama/build.yaml @@ -5,9 +5,7 @@ distribution_spec: inference: - remote::ollama vector_io: - - inline::faiss - remote::chromadb - - remote::pgvector safety: - inline::llama-guard agents: @@ -17,21 +15,33 @@ distribution_spec: eval: - inline::meta-reference datasetio: - - remote::huggingface - inline::localfs scoring: - inline::basic - inline::llm-as-judge - - inline::braintrust - post_training: - - inline::huggingface tool_runtime: - remote::brave-search - remote::tavily-search - inline::rag-runtime - remote::model-context-protocol - remote::wolfram-alpha -image_type: conda + metadata_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/ollama}/registry.db + inference_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/ollama}/inference_store.db + models: + - metadata: {} + model_id: ${env.INFERENCE_MODEL} + provider_id: remote::ollama + model_type: llm + - metadata: + embedding_dimension: 384 + model_id: all-MiniLM-L6-v2 + provider_id: remote::ollama + provider_model_id: all-minilm:latest + model_type: embedding +image_type: container additional_pip_packages: - sqlalchemy[asyncio] -- sqlalchemy[asyncio] diff --git a/pyproject.toml b/pyproject.toml index 0b3b30a7f..0f8ebd20e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -138,6 +138,7 @@ explicit = true [tool.uv.sources] torch = [{ index = "pytorch-cpu" }] torchvision = [{ index = "pytorch-cpu" }] +llama-stack = { workspace = true } [tool.ruff] line-length = 120 @@ -331,5 +332,10 @@ init_forbid_extra = true init_typed = true warn_required_dynamic_aliases = true +[dependency-groups] +dev = [ + "llama-stack", +] + [tool.ruff.lint.pep8-naming] classmethod-decorators = ["classmethod", "pydantic.field_validator"] diff --git a/uv.lock b/uv.lock index f6dae2944..cb2186202 100644 --- a/uv.lock +++ b/uv.lock @@ -1553,6 +1553,11 @@ unit = [ { name = "sqlite-vec" }, ] +[package.dev-dependencies] +dev = [ + { name = "llama-stack" }, +] + [package.metadata] requires-dist = [ { name = "aiohttp", marker = "extra == 'test'" }, @@ -1639,6 +1644,9 @@ requires-dist = [ ] provides-extras = ["dev", "unit", "test", "docs", "codegen", "ui"] +[package.metadata.requires-dev] +dev = [{ name = "llama-stack", editable = "." }] + [[package]] name = "llama-stack-client" version = "0.2.7"