From 327b17e5f09dc53e775a8386bf736c8465d368d1 Mon Sep 17 00:00:00 2001 From: Reid <61492567+reidliu41@users.noreply.github.com> Date: Sun, 2 Mar 2025 02:39:32 +0800 Subject: [PATCH] chore: add container cmd check in start_stack.sh (#1340) # What does this PR do? [Provide a short summary of what this PR does and why. Link to relevant issues if applicable.] [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan [Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.*] [//]: # (## Documentation) Signed-off-by: reidliu Co-authored-by: reidliu --- llama_stack/distribution/start_stack.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llama_stack/distribution/start_stack.sh b/llama_stack/distribution/start_stack.sh index 901af1ce0..4656bebae 100755 --- a/llama_stack/distribution/start_stack.sh +++ b/llama_stack/distribution/start_stack.sh @@ -100,6 +100,12 @@ esac set -x +# Check if container command is available +if ! is_command_available $CONTAINER_BINARY; then + printf "${RED}Error: ${CONTAINER_BINARY} command not found. Is ${CONTAINER_BINARY} installed and in your PATH?${NC}" >&2 + exit 1 +fi + if [[ "$env_type" == "venv" || "$env_type" == "conda" ]]; then $PYTHON_BINARY -m llama_stack.distribution.server.server \ --yaml-config "$yaml_config" \