forked from phoenix-oss/llama-stack-mirror
[CLI] remove dependency on CONDA_PREFIX in CLI (#144)
* remove dependency on CONDA_PREFIX in CLI * lint * typo * more robust
This commit is contained in:
parent
fe460ba103
commit
6a8c2ae1df
4 changed files with 26 additions and 20 deletions
|
@ -17,9 +17,9 @@ if [ -n "$LLAMA_MODELS_DIR" ]; then
|
|||
echo "Using llama-models-dir=$LLAMA_MODELS_DIR"
|
||||
fi
|
||||
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Usage: $0 <distribution_type> <build_name> <pip_dependencies> [<special_pip_deps>]" >&2
|
||||
echo "Example: $0 <distribution_type> mybuild 'numpy pandas scipy'" >&2
|
||||
if [ "$#" -lt 3 ]; then
|
||||
echo "Usage: $0 <distribution_type> <build_name> <build_file_path> <pip_dependencies> [<special_pip_deps>]" >&2
|
||||
echo "Example: $0 <distribution_type> mybuild ./my-stack-build.yaml 'numpy pandas scipy'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -29,7 +29,8 @@ set -euo pipefail
|
|||
|
||||
build_name="$1"
|
||||
env_name="llamastack-$build_name"
|
||||
pip_dependencies="$2"
|
||||
build_file_path="$2"
|
||||
pip_dependencies="$3"
|
||||
|
||||
# Define color codes
|
||||
RED='\033[0;31m'
|
||||
|
@ -123,6 +124,9 @@ ensure_conda_env_python310() {
|
|||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
mv $build_file_path $CONDA_PREFIX/
|
||||
echo "Build spec configuration saved at $CONDA_PREFIX/$build_name-build.yaml"
|
||||
}
|
||||
|
||||
ensure_conda_env_python310 "$env_name" "$pip_dependencies" "$special_pip_deps"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue