mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-10 07:35:59 +00:00
Update start conda
This commit is contained in:
parent
47c37fd831
commit
b822149098
1 changed files with 16 additions and 15 deletions
|
@ -36,28 +36,29 @@ shift
|
||||||
# Process environment variables from --env arguments
|
# Process environment variables from --env arguments
|
||||||
env_vars=""
|
env_vars=""
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--env)
|
--env)
|
||||||
|
|
||||||
if [[ -n "$2" ]]; then
|
if [[ -n "$2" ]]; then
|
||||||
# collect environment variables so we can set them after activating the conda env
|
# collect environment variables so we can set them after activating the conda env
|
||||||
env_vars="$env_vars --env $2"
|
env_vars="$env_vars --env $2"
|
||||||
shift 2
|
shift 2
|
||||||
else
|
else
|
||||||
echo -e "${RED}Error: --env requires a KEY=VALUE argument${NC}" >&2
|
echo -e "${RED}Error: --env requires a KEY=VALUE argument${NC}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
eval "$(conda shell.bash hook)"
|
eval "$(conda shell.bash hook)"
|
||||||
conda deactivate && conda activate "$env_name"
|
conda deactivate && conda activate "$env_name"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
echo "ENV VARS $env_vars"
|
||||||
$CONDA_PREFIX/bin/python \
|
$CONDA_PREFIX/bin/python \
|
||||||
-m llama_stack.distribution.server.server \
|
-m llama_stack.distribution.server.server \
|
||||||
--yaml_config "$yaml_config" \
|
--yaml_config "$yaml_config" \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue