mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 14:08:00 +00:00
setup env vars, fix ollama model reference
This commit is contained in:
parent
522d62d631
commit
12ea3cb442
4 changed files with 28 additions and 15 deletions
33
.github/actions/run-and-record-tests/action.yml
vendored
33
.github/actions/run-and-record-tests/action.yml
vendored
|
@ -29,6 +29,28 @@ runs:
|
||||||
free -h
|
free -h
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
|
- name: Set environment variables
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export LLAMA_STACK_CLIENT_TIMEOUT="300"
|
||||||
|
export LLAMA_STACK_TEST_INFERENCE_MODE="${{ inputs.inference-mode }}"
|
||||||
|
export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings"
|
||||||
|
|
||||||
|
# Configure provider-specific settings
|
||||||
|
if [ "${{ inputs.provider }}" == "ollama" ]; then
|
||||||
|
export OLLAMA_URL="http://0.0.0.0:11434"
|
||||||
|
export TEXT_MODEL="ollama/llama3.2:3b-instruct-fp16"
|
||||||
|
export SAFETY_MODEL="ollama/llama-guard3:1b"
|
||||||
|
else
|
||||||
|
export VLLM_URL="http://localhost:8000/v1"
|
||||||
|
export TEXT_MODEL="vllm/meta-llama/Llama-3.2-1B-Instruct"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
||||||
|
export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings/vision"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
- name: Run Llama Stack Server
|
- name: Run Llama Stack Server
|
||||||
if: ${{ contains(inputs.stack-config, 'server:') }}
|
if: ${{ contains(inputs.stack-config, 'server:') }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -51,30 +73,20 @@ runs:
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Run Integration Tests
|
- name: Run Integration Tests
|
||||||
env:
|
|
||||||
LLAMA_STACK_CLIENT_TIMEOUT: "300"
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
stack_config="${{ inputs.stack-config }}"
|
stack_config="${{ inputs.stack-config }}"
|
||||||
EXCLUDE_TESTS="builtin_tool or safety_with_image or code_interpreter or test_rag"
|
EXCLUDE_TESTS="builtin_tool or safety_with_image or code_interpreter or test_rag"
|
||||||
|
|
||||||
export LLAMA_STACK_TEST_INFERENCE_MODE="${{ inputs.inference-mode }}"
|
|
||||||
|
|
||||||
# Configure provider-specific settings
|
# Configure provider-specific settings
|
||||||
if [ "${{ inputs.provider }}" == "ollama" ]; then
|
if [ "${{ inputs.provider }}" == "ollama" ]; then
|
||||||
export OLLAMA_URL="http://0.0.0.0:11434"
|
|
||||||
export TEXT_MODEL="ollama/llama3.2:3b-instruct-fp16"
|
|
||||||
export SAFETY_MODEL="ollama/llama-guard3:1b"
|
|
||||||
EXTRA_PARAMS="--safety-shield=llama-guard"
|
EXTRA_PARAMS="--safety-shield=llama-guard"
|
||||||
else
|
else
|
||||||
export VLLM_URL="http://localhost:8000/v1"
|
|
||||||
export TEXT_MODEL="vllm/meta-llama/Llama-3.2-1B-Instruct"
|
|
||||||
EXTRA_PARAMS=""
|
EXTRA_PARAMS=""
|
||||||
EXCLUDE_TESTS="${EXCLUDE_TESTS} or test_inference_store_tool_calls"
|
EXCLUDE_TESTS="${EXCLUDE_TESTS} or test_inference_store_tool_calls"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
||||||
export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings/vision"
|
|
||||||
if uv run pytest -s -v tests/integration/inference/test_vision_inference.py --stack-config=${stack_config} \
|
if uv run pytest -s -v tests/integration/inference/test_vision_inference.py --stack-config=${stack_config} \
|
||||||
-k "not( ${EXCLUDE_TESTS} )" \
|
-k "not( ${EXCLUDE_TESTS} )" \
|
||||||
--vision-model=ollama/llama3.2-vision:11b \
|
--vision-model=ollama/llama3.2-vision:11b \
|
||||||
|
@ -91,7 +103,6 @@ runs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run non-vision tests
|
# Run non-vision tests
|
||||||
export LLAMA_STACK_TEST_RECORDING_DIR="tests/integration/recordings"
|
|
||||||
TEST_TYPES='${{ inputs.test-types }}'
|
TEST_TYPES='${{ inputs.test-types }}'
|
||||||
echo "Test types to run: $TEST_TYPES"
|
echo "Test types to run: $TEST_TYPES"
|
||||||
|
|
||||||
|
|
2
.github/actions/setup-ollama/action.yml
vendored
2
.github/actions/setup-ollama/action.yml
vendored
|
@ -12,7 +12,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
||||||
image="ollama/ollama-with-vision-model"
|
image="ollama-with-vision-model"
|
||||||
else
|
else
|
||||||
image="ollama-with-models"
|
image="ollama-with-models"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Containerfile used to build our all in one ollama image to run tests in CI
|
# Containerfile used to build our all in one ollama image to run tests in CI
|
||||||
# podman build --platform linux/amd64 -f Containerfile -t ollama-with-models .
|
#
|
||||||
|
# podman build --platform linux/amd64 -f ./ollama-with-models.containerfile -t ollama-with-models .
|
||||||
#
|
#
|
||||||
FROM --platform=linux/amd64 ollama/ollama:latest
|
FROM --platform=linux/amd64 ollama/ollama:latest
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Containerfile used to build our all in one ollama image to run tests in CI
|
# Containerfile used to build our Ollama image with vision model to run tests in CI
|
||||||
# podman build --platform linux/amd64 -f VisionContainerfile -t ollama-with-vision-model .
|
#
|
||||||
|
# podman build --platform linux/amd64 -f ./ollama-with-vision-model.containerfile -t ollama-with-vision-model .
|
||||||
#
|
#
|
||||||
FROM --platform=linux/amd64 ollama/ollama:latest
|
FROM --platform=linux/amd64 ollama/ollama:latest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue