mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-21 09:23:13 +00:00
chore(ci): dont run llama stack server always (#3188)
Sometimes the server has already been started (e.g., via docker). Just a convenience here so we can reuse this script more.
This commit is contained in:
parent
a8091d0c6a
commit
f4cecaade9
1 changed files with 26 additions and 17 deletions
|
@ -133,6 +133,10 @@ else
|
||||||
EXTRA_PARAMS=""
|
EXTRA_PARAMS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
THIS_DIR=$(dirname "$0")
|
||||||
|
ROOT_DIR="$THIS_DIR/.."
|
||||||
|
cd $ROOT_DIR
|
||||||
|
|
||||||
# Set recording directory
|
# Set recording directory
|
||||||
if [[ "$RUN_VISION_TESTS" == "true" ]]; then
|
if [[ "$RUN_VISION_TESTS" == "true" ]]; then
|
||||||
export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings/vision"
|
export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings/vision"
|
||||||
|
@ -142,6 +146,10 @@ fi
|
||||||
|
|
||||||
# Start Llama Stack Server if needed
|
# Start Llama Stack Server if needed
|
||||||
if [[ "$STACK_CONFIG" == *"server:"* ]]; then
|
if [[ "$STACK_CONFIG" == *"server:"* ]]; then
|
||||||
|
# check if server is already running
|
||||||
|
if curl -s http://localhost:8321/v1/health 2>/dev/null | grep -q "OK"; then
|
||||||
|
echo "Llama Stack Server is already running, skipping start"
|
||||||
|
else
|
||||||
echo "=== Starting Llama Stack Server ==="
|
echo "=== Starting Llama Stack Server ==="
|
||||||
nohup uv run llama stack run ci-tests --image-type venv > server.log 2>&1 &
|
nohup uv run llama stack run ci-tests --image-type venv > server.log 2>&1 &
|
||||||
|
|
||||||
|
@ -160,6 +168,7 @@ if [[ "$STACK_CONFIG" == *"server:"* ]]; then
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo ""
|
echo ""
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue