forked from phoenix-oss/llama-stack-mirror
fix: avoid failure when no special pip deps and better exit (#1228)
# What does this PR do? When building providers in a virtual environment or containers, special pip dependencies may not always be provided (e.g., for Ollama). The check should only fail if the required number of arguments is missing. Currently, two arguments are mandatory: 1. Environment name 2. Pip dependencies Additionally, return statements were replaced with sys.exit(1) in error conditions to ensure immediate termination on critical failures. Error handling in the stack build process was also improved to guarantee the program exits with status 1 when facing configuration issues or build failures. Signed-off-by: Sébastien Han <seb@redhat.com> [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan This command shouldn't fail: ``` llama stack build --template ollama --image-type venv ``` [//]: # (## Documentation) Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
d6356f822a
commit
c4987bc349
3 changed files with 13 additions and 12 deletions
|
@ -34,7 +34,7 @@ container_base="$3"
|
|||
build_file_path="$4"
|
||||
host_build_dir="$5"
|
||||
pip_dependencies="$6"
|
||||
special_pip_deps="$7"
|
||||
special_pip_deps="${7:-}"
|
||||
|
||||
|
||||
# Define color codes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue