diff --git a/llama_stack/distribution/start_conda_env.sh b/llama_stack/distribution/start_conda_env.sh index 18fc30fc5..d75b4afc9 100755 --- a/llama_stack/distribution/start_conda_env.sh +++ b/llama_stack/distribution/start_conda_env.sh @@ -36,28 +36,29 @@ shift # Process environment variables from --env arguments env_vars="" while [[ $# -gt 0 ]]; do - case "$1" in - --env) + case "$1" in + --env) - if [[ -n "$2" ]]; then - # collect environment variables so we can set them after activating the conda env - env_vars="$env_vars --env $2" - shift 2 - else - echo -e "${RED}Error: --env requires a KEY=VALUE argument${NC}" >&2 - exit 1 - fi - ;; - *) - shift - ;; - esac + if [[ -n "$2" ]]; then + # collect environment variables so we can set them after activating the conda env + env_vars="$env_vars --env $2" + shift 2 + else + echo -e "${RED}Error: --env requires a KEY=VALUE argument${NC}" >&2 + exit 1 + fi + ;; + *) + shift + ;; + esac done eval "$(conda shell.bash hook)" conda deactivate && conda activate "$env_name" set -x +echo "ENV VARS $env_vars" $CONDA_PREFIX/bin/python \ -m llama_stack.distribution.server.server \ --yaml_config "$yaml_config" \