mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 13:00:39 +00:00
Update llama_stack/distribution/start_stack.sh
Co-authored-by: Yuan Tang <terrytangyuan@gmail.com> Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
a6b1294d39
commit
238d69b3cf
1 changed files with 7 additions and 3 deletions
|
@ -44,6 +44,7 @@ shift
|
||||||
port="$1"
|
port="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
||||||
source "$SCRIPT_DIR/common.sh"
|
source "$SCRIPT_DIR/common.sh"
|
||||||
|
|
||||||
# Initialize env_vars as an string
|
# Initialize env_vars as an string
|
||||||
|
@ -78,9 +79,10 @@ case "$env_type" in
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$env_path_or_name/bin/activate"]; then
|
if [ ! -f "$env_path_or_name/bin/activate" ]; then
|
||||||
echo -e "${RED}Error: Virtual environent activate binary not found at $env_path_or_name/bin/activate" >&2
|
echo -e "${RED}Error: Virtual environment activate binary not found at $env_path_or_name/bin/activate" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
source "$env_path_or_name/bin/activate"
|
source "$env_path_or_name/bin/activate"
|
||||||
;;
|
;;
|
||||||
|
@ -88,6 +90,7 @@ case "$env_type" in
|
||||||
if ! is_command_available conda; then
|
if ! is_command_available conda; then
|
||||||
echo -e "${RED}Error: conda not found" >&2
|
echo -e "${RED}Error: conda not found" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
eval "$(conda shell.bash hook)"
|
eval "$(conda shell.bash hook)"
|
||||||
conda deactivate && conda activate "$env_path_or_name"
|
conda deactivate && conda activate "$env_path_or_name"
|
||||||
PYTHON_BINARY="$CONDA_PREFIX/bin/python"
|
PYTHON_BINARY="$CONDA_PREFIX/bin/python"
|
||||||
|
@ -125,9 +128,10 @@ elif [[ "$env_type" == "container" ]]; then
|
||||||
elif [ -n "$TEST_PYPI_VERSION" ]; then
|
elif [ -n "$TEST_PYPI_VERSION" ]; then
|
||||||
version_tag="test-$TEST_PYPI_VERSION"
|
version_tag="test-$TEST_PYPI_VERSION"
|
||||||
else
|
else
|
||||||
if ! command_is_available jq:
|
if ! is_command_available jq; then
|
||||||
echo -e "${RED}Error: jq not found" >&2
|
echo -e "${RED}Error: jq not found" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
URL="https://pypi.org/pypi/llama-stack/json"
|
URL="https://pypi.org/pypi/llama-stack/json"
|
||||||
version_tag=$(curl -s $URL | jq -r '.info.version')
|
version_tag=$(curl -s $URL | jq -r '.info.version')
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue