From 9b130f96a7e2a3386c7dfbc443ef40f1db62d856 Mon Sep 17 00:00:00 2001 From: Charlie Doern Date: Tue, 25 Feb 2025 14:08:50 -0500 Subject: [PATCH] fix: build_venv expects an extra argument (#1233) # What does this PR do? currently, build_venv.sh expects a `distribution_type` as the first argument but the only things ever passed are: 1. image name 2. pip dependencies so distribution_type is never passed in meaning the script errors when calling something like: `llama stack build --image-type venv --template ollama --image-name test` before output: ``` llama stack build --image-type venv --template ollama --image-name venv-test Usage: /Users/charliedoern/projects/Documents/llama-stack/llama_stack/distribution/build_venv.sh [] Example: /Users/charliedoern/projects/Documents/llama-stack/llama_stack/distribution/build_venv.sh mybuild ./my-stack-build.yaml 'numpy pandas scipy' Failed to build target venv-test with return code 1 Run config path is empty ``` after: ``` llama stack build --image-type venv --template ollama --image-name venv-test Environment 'venv-test' already exists, re-using it. Using virtual environment venv-test Using CPython 3.13.0 interpreter at: /opt/homebrew/opt/python@3.13/bin/python3.13 Creating virtual environment at: venv-test Activate with: source venv-test/bin/activate Using Python 3.13.0 environment at: venv-test Resolved 55 packages in 640ms Built fire==0.7.0 Prepared 54 packages in 1.14s Installed 55 packages in 82ms + annotated-types==0.7.0 ``` ## Test Plan ran locally with output above Signed-off-by: Charlie Doern --- llama_stack/distribution/build_venv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llama_stack/distribution/build_venv.sh b/llama_stack/distribution/build_venv.sh index 52c5c7051..b1e6ac699 100755 --- a/llama_stack/distribution/build_venv.sh +++ b/llama_stack/distribution/build_venv.sh @@ -26,8 +26,8 @@ if [ -n "$LLAMA_MODELS_DIR" ]; then fi if [ "$#" -lt 2 ]; then - echo "Usage: $0 []" >&2 - echo "Example: $0 mybuild ./my-stack-build.yaml 'numpy pandas scipy'" >&2 + echo "Usage: $0 []" >&2 + echo "Example: $0 mybuild ./my-stack-build.yaml 'numpy pandas scipy'" >&2 exit 1 fi