mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 02:32:40 +00:00
try test docker
This commit is contained in:
parent
d140b73371
commit
ff55bacf95
3 changed files with 42 additions and 24 deletions
58
.github/workflows/publish-to-docker.yml
vendored
58
.github/workflows/publish-to-docker.yml
vendored
|
@ -1,6 +1,7 @@
|
||||||
name: Docker Build and Publish
|
name: Docker Build and Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
|
@ -11,6 +12,10 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
|
||||||
|
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
|
||||||
|
TAVILY_SEARCH_API_KEY: ${{ secrets.TAVILY_SEARCH_API_KEY }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
@ -32,7 +37,7 @@ jobs:
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event_name }}" = "push" ]; then
|
if [ "${{ github.event_name }}" = "push" ]; then
|
||||||
echo "VERSION=0.0.63.dev20250114" >> $GITHUB_OUTPUT
|
echo "VERSION=0.0.63.dev51206766" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "VERSION=${{ inputs.version }}" >> $GITHUB_OUTPUT
|
echo "VERSION=${{ inputs.version }}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
@ -72,7 +77,8 @@ jobs:
|
||||||
|
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
run: |
|
run: |
|
||||||
TEMPLATES=("ollama" "bedrock" "remote-vllm" "fireworks" "together" "tgi" "meta-reference-gpu")
|
# TEMPLATES=("ollama" "bedrock" "remote-vllm" "fireworks" "together" "tgi" "meta-reference-gpu")
|
||||||
|
TEMPLATES=("fireworks")
|
||||||
for template in "${TEMPLATES[@]}"; do
|
for template in "${TEMPLATES[@]}"; do
|
||||||
if [ "$PYPI_SOURCE" = "testpypi" ]; then
|
if [ "$PYPI_SOURCE" = "testpypi" ]; then
|
||||||
TEST_PYPI_VERSION=${{ steps.version.outputs.version }} llama stack build --template $template --image-type container
|
TEST_PYPI_VERSION=${{ steps.version.outputs.version }} llama stack build --template $template --image-type container
|
||||||
|
@ -87,22 +93,34 @@ jobs:
|
||||||
|
|
||||||
- name: Start up built docker image
|
- name: Start up built docker image
|
||||||
run: |
|
run: |
|
||||||
cd distributions/together
|
cd distributions/fireworks
|
||||||
docker compose up
|
docker compose up -d
|
||||||
|
# Wait for the container to start
|
||||||
- name: Start up built docker image
|
timeout=300
|
||||||
run: |
|
while ! curl -s -f http://localhost:8321/v1/version > /dev/null && [ $timeout -gt 0 ]; do
|
||||||
llama-stack-client models list
|
echo "Waiting for endpoint to be available..."
|
||||||
|
sleep 5
|
||||||
- name: Push to dockerhub
|
timeout=$((timeout - 5))
|
||||||
run: |
|
|
||||||
TEMPLATES=("ollama" "bedrock" "remote-vllm" "fireworks" "together" "tgi" "meta-reference-gpu")
|
|
||||||
for template in "${TEMPLATES[@]}"; do
|
|
||||||
if [ "$PYPI_SOURCE" = "testpypi" ]; then
|
|
||||||
docker tag distribution-$template:test-${{ steps.version.outputs.version }} llamastack/distribution-$template:test-${{ steps.version.outputs.version }}
|
|
||||||
docker push llamastack/distribution-$template:test-${{ steps.version.outputs.version }}
|
|
||||||
else
|
|
||||||
docker tag distribution-$template:${{ steps.version.outputs.version }} llamastack/distribution-$template:${{ steps.version.outputs.version }}
|
|
||||||
docker push llamastack/distribution-$template:${{ steps.version.outputs.version }}
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $timeout -le 0 ]; then
|
||||||
|
echo "Timeout waiting for endpoint to become available"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Run test on docker server
|
||||||
|
run: |
|
||||||
|
LLAMA_STACK_BASE_URL="http://localhost:8321" pytest -v tests/client-sdk/inference/test_inference.py --md-report --md-report-verbose=1
|
||||||
|
|
||||||
|
# - name: Push to dockerhub
|
||||||
|
# run: |
|
||||||
|
# TEMPLATES=("ollama" "bedrock" "remote-vllm" "fireworks" "together" "tgi" "meta-reference-gpu")
|
||||||
|
# for template in "${TEMPLATES[@]}"; do
|
||||||
|
# if [ "$PYPI_SOURCE" = "testpypi" ]; then
|
||||||
|
# docker tag distribution-$template:test-${{ steps.version.outputs.version }} llamastack/distribution-$template:test-${{ steps.version.outputs.version }}
|
||||||
|
# docker push llamastack/distribution-$template:test-${{ steps.version.outputs.version }}
|
||||||
|
# else
|
||||||
|
# docker tag distribution-$template:${{ steps.version.outputs.version }} llamastack/distribution-$template:${{ steps.version.outputs.version }}
|
||||||
|
# docker push llamastack/distribution-$template:${{ steps.version.outputs.version }}
|
||||||
|
# fi
|
||||||
|
# done
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
services:
|
services:
|
||||||
llamastack:
|
llamastack:
|
||||||
image: llamastack/fireworks
|
image: distribution-fireworks:test-0.0.63.dev51206766
|
||||||
ports:
|
ports:
|
||||||
- "8321:8321"
|
- "8321:8321"
|
||||||
environment:
|
environment:
|
||||||
- FIREWORKS_API_KEY=${FIREWORKS_API_KEY}
|
- FIREWORKS_API_KEY=${FIREWORKS_API_KEY}
|
||||||
entrypoint: bash -c "llama stack run fireworks"
|
entrypoint: bash -c "python -m llama_stack.distribution.server.server --template fireworks"
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
services:
|
services:
|
||||||
llamastack:
|
llamastack:
|
||||||
image: llamastack/together
|
image: distribution-together:test-0.0.63.dev51206766
|
||||||
ports:
|
ports:
|
||||||
- "8321:8321"
|
- "8321:8321"
|
||||||
environment:
|
environment:
|
||||||
- TOGETHER_API_KEY=${TOGETHER_API_KEY}
|
- TOGETHER_API_KEY=${TOGETHER_API_KEY}
|
||||||
entrypoint: bash -c "llama stack run together"
|
entrypoint: bash -c "python -m llama_stack.distribution.server.server --template together"
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue