1919 - main
2020 - rhoai-v*
2121
22- # build a custom image from an arbitrary llama-stack commit
22+ # build a custom image from an arbitrary ogx commit
2323 # NOTE: workflow_dispatch intentionally skips all tests (vllm setup, postgres setup, smoke tests, integration tests)
2424 # This allows building images for specific SHAs even when CI is failing on other commits,
2525 # useful for testing specific changes without being blocked by unrelated test failures.
2626 workflow_dispatch :
2727 inputs :
28- llama_stack_commit_sha :
29- description : ' Llama Stack commit SHA to build from - accept long and short commit SHAs'
28+ ogx_commit_sha :
29+ description : ' OGX commit SHA to build from - accept long and short commit SHAs'
3030 required : true
3131 type : string
3232
33- # do a nightly test of the `main` branch of llama-stack at 6AM UTC every morning
33+ # do a nightly test of the `main` branch of ogx at 6AM UTC every morning
3434 schedule :
3535 - cron : ' 0 6 * * *'
3636
@@ -40,7 +40,7 @@ concurrency:
4040
4141env :
4242 REGISTRY : quay.io
43- IMAGE_NAME : quay.io/opendatahub/llama-stack # tags for the image will be added dynamically
43+ IMAGE_NAME : quay.io/opendatahub/odh-ogx-core # tags for the image will be added dynamically
4444
4545jobs :
4646 build-test :
6868 EMBEDDING_MODEL : vllm-embedding/ibm-granite/granite-embedding-125m-english
6969 VLLM_URL : http://localhost:8000/v1
7070 VLLM_EMBEDDING_URL : http://localhost:8001/v1
71- LLAMA_STACK_COMMIT_SHA : ${{ github.event.inputs.llama_stack_commit_sha || 'main' }}
71+ OGX_COMMIT_SHA : ${{ github.event.inputs.ogx_commit_sha || 'main' }}
7272 permissions :
7373 id-token : write # for Google Cloud authentication
7474 contents : read
@@ -102,22 +102,25 @@ jobs:
102102 - name : Set up Docker Buildx
103103 uses : docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
104104
105- - name : Generate Containerfile to build an image from an arbitrary llama-stack commit (workflow_dispatch/schedule)
105+ - name : Generate Containerfile to build an image from an arbitrary ogx commit (workflow_dispatch/schedule)
106106 if : contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name)
107107 env :
108- LLAMA_STACK_VERSION : ${{ env.LLAMA_STACK_COMMIT_SHA }}
108+ OGX_VERSION : ${{ env.OGX_COMMIT_SHA }}
109109 run : |
110110 tmp_build_dir=$(mktemp -d)
111- git clone --filter=blob:none --no-checkout https://github.com/opendatahub-io/llama-stack .git "$tmp_build_dir"
111+ git clone --filter=blob:none --no-checkout https://github.com/opendatahub-io/ogx .git "$tmp_build_dir"
112112 cd "$tmp_build_dir"
113- git checkout "$LLAMA_STACK_VERSION "
113+ git checkout "$OGX_VERSION "
114114 python3 -m venv .venv
115115 source .venv/bin/activate
116+ # Extract base version from pyproject.toml (e.g., 0.8.0+rhaiv.0 -> 0.8.0) to pin ogx-api
117+ OGX_BASE_VERSION=$(python3 -c "import tomllib; t=tomllib.load(open('pyproject.toml','rb')); print(t.get('project',{}).get('version', t.get('tool',{}).get('setuptools_scm',{}).get('fallback_version','')).split('+')[0])")
116118 pip install --no-cache -e .
119+ pip install --no-cache "ogx-api==${OGX_BASE_VERSION}" ruamel.yaml
117120 # now remove the install line from the Containerfile
118121 cd -
119122 python3 distribution/build.py
120- sed -i '/^RUN pip install --no-cache llama-stack ==/d' distribution/Containerfile
123+ sed -i '/^RUN.* pip install.*ogx ==/d' distribution/Containerfile
121124
122125 - name : Build image for testing (${{ matrix.arch }})
123126 id : build
@@ -127,7 +130,7 @@ jobs:
127130 file : distribution/Containerfile
128131 platforms : ${{ matrix.platform }}
129132 push : false
130- tags : ${{ env.IMAGE_NAME }}:${{ contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) && format('source-{0}-{1}', env.LLAMA_STACK_COMMIT_SHA , github.sha) || github.sha }}
133+ tags : ${{ env.IMAGE_NAME }}:${{ contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) && format('source-{0}-{1}', env.OGX_COMMIT_SHA , github.sha) || github.sha }}
131134 load : true
132135 cache-from : type=gha,scope=build-${{ matrix.arch }}
133136 cache-to : type=gha,mode=max,scope=build-${{ matrix.arch }}
@@ -213,7 +216,7 @@ jobs:
213216 # Create logs directory
214217 mkdir -p logs
215218
216- docker logs llama-stack > logs/llama-stack .log 2>&1 || echo "Failed to get llama-stack logs" > logs/llama-stack .log
219+ docker logs ogx > logs/ogx .log 2>&1 || echo "Failed to get ogx. logs" > logs/ogx .log
217220 docker logs vllm-inference > logs/vllm-inference.log 2>&1 || echo "Failed to get vllm-inference logs" > logs/vllm-inference.log
218221 docker logs vllm-embedding > logs/vllm-embedding.log 2>&1 || echo "Failed to get vllm-embedding logs" > logs/vllm-embedding.log
219222 docker logs postgres > logs/postgres.log 2>&1 || echo "Failed to get postgres logs" > logs/postgres.log
@@ -233,8 +236,8 @@ jobs:
233236
234237 # Gather integration test logs if they exist
235238 echo "=== Integration test artifacts ==="
236- if [ -d "/tmp/llama-stack -integration-tests" ]; then
237- find /tmp/llama-stack -integration-tests -name "*.log" -o -name "pytest.log" -o -name "*.out" 2>/dev/null | while read -r file; do
239+ if [ -d "/tmp/ogx -integration-tests" ]; then
240+ find /tmp/ogx -integration-tests -name "*.log" -o -name "pytest.log" -o -name "*.out" 2>/dev/null | while read -r file; do
238241 cp "$file" "logs/$(basename "$file")" || true
239242 done
240243 fi
@@ -251,7 +254,7 @@ jobs:
251254 if : always()
252255 shell : bash
253256 run : |
254- for c in vllm-inference vllm-embedding llama-stack postgres; do
257+ for c in vllm-inference vllm-embedding ogx postgres; do
255258 docker rm -f "$c" 2>/dev/null || true
256259 done
257260
@@ -265,7 +268,7 @@ jobs:
265268 env :
266269 SLACK_WEBHOOK_URL : ${{ secrets.WH_SLACK_TEAM_LLS_CORE }}
267270 IMAGE_NAME : ${{ env.IMAGE_NAME }}
268- IMAGE_TAG : ${{ contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) && format('source-{0}-{1}', env.LLAMA_STACK_COMMIT_SHA , github.sha) || github.sha }}
271+ IMAGE_TAG : ${{ contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) && format('source-{0}-{1}', env.OGX_COMMIT_SHA , github.sha) || github.sha }}
269272 COMMIT_SHA : ${{ github.sha }}
270273 WORKFLOW_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
271274 run : |
@@ -274,13 +277,13 @@ jobs:
274277
275278 if [[ "${NOTIFY_FAILURE:-0}" == "1" ]]; then
276279 TEXT=$(printf '%s\n%s\n%s' \
277- ":failed: *Build failed for Llama Stack * - [${TIMESTAMP}]" \
280+ ":failed: *Build failed for OGX * - [${TIMESTAMP}]" \
278281 "Commit: ${COMMIT_SHA_SHORT}" \
279282 "<${WORKFLOW_URL}|View workflow run>")
280283 bash .github/actions/notify-slack/notify.sh "$TEXT" "#d00000"
281284 else
282285 TEXT=$(printf '%s\n%s\n%s\n%s' \
283- ":greenchecked: *New image is available for Llama Stack * - [${TIMESTAMP}]" \
286+ ":greenchecked: *New image is available for OGX * - [${TIMESTAMP}]" \
284287 "Image: ${IMAGE_NAME}:${IMAGE_TAG}" \
285288 "Commit: ${COMMIT_SHA_SHORT}" \
286289 "<${WORKFLOW_URL}|View workflow run>")
@@ -290,21 +293,21 @@ jobs:
290293 - name : Output custom build information
291294 if : matrix.arch == 'amd64' && contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name)
292295 env :
293- LLS_COMMIT : ${{ env.LLAMA_STACK_COMMIT_SHA }}
296+ OGX_COMMIT : ${{ env.OGX_COMMIT_SHA }}
294297 run : |
295298 echo "Custom container image built successfully!"
296- echo "Image: $IMAGE_NAME:source-$LLS_COMMIT -$GITHUB_SHA"
297- echo "Llama Stack commit: $LLS_COMMIT "
299+ echo "Image: $IMAGE_NAME:source-$OGX_COMMIT -$GITHUB_SHA"
300+ echo "OGX commit: $OGX_COMMIT "
298301 echo ""
299302 echo "You can pull this image using:"
300- echo "docker pull $IMAGE_NAME:source-$LLS_COMMIT -$GITHUB_SHA"
303+ echo "docker pull $IMAGE_NAME:source-$OGX_COMMIT -$GITHUB_SHA"
301304
302305 publish :
303306 needs : build-test
304307 if : github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && needs.build-test.outputs.distribution-changed == 'true')
305308 runs-on : ubuntu-latest
306309 env :
307- LLAMA_STACK_COMMIT_SHA : ${{ github.event.inputs.llama_stack_commit_sha || 'main' }}
310+ OGX_COMMIT_SHA : ${{ github.event.inputs.ogx_commit_sha || 'main' }}
308311 permissions :
309312 contents : read
310313 steps :
@@ -317,22 +320,25 @@ jobs:
317320 with :
318321 python-version : 3.12
319322
320- - name : Generate Containerfile to build an image from an arbitrary llama-stack commit (workflow_dispatch)
323+ - name : Generate Containerfile to build an image from an arbitrary ogx commit (workflow_dispatch)
321324 if : github.event_name == 'workflow_dispatch'
322325 env :
323- LLAMA_STACK_VERSION : ${{ env.LLAMA_STACK_COMMIT_SHA }}
326+ OGX_VERSION : ${{ env.OGX_COMMIT_SHA }}
324327 run : |
325328 tmp_build_dir=$(mktemp -d)
326- git clone --filter=blob:none --no-checkout https://github.com/opendatahub-io/llama-stack .git "$tmp_build_dir"
329+ git clone --filter=blob:none --no-checkout https://github.com/opendatahub-io/ogx .git "$tmp_build_dir"
327330 cd "$tmp_build_dir"
328- git checkout "$LLAMA_STACK_VERSION "
331+ git checkout "$OGX_VERSION "
329332 python3 -m venv .venv
330333 source .venv/bin/activate
334+ # Extract base version from pyproject.toml (e.g., 0.8.0+rhaiv.0 -> 0.8.0) to pin ogx-api
335+ OGX_BASE_VERSION=$(python3 -c "import tomllib; t=tomllib.load(open('pyproject.toml','rb')); print(t.get('project',{}).get('version', t.get('tool',{}).get('setuptools_scm',{}).get('fallback_version','')).split('+')[0])")
331336 pip install --no-cache -e .
337+ pip install --no-cache "ogx-api==${OGX_BASE_VERSION}" ruamel.yaml
332338 # now remove the install line from the Containerfile
333339 cd -
334340 python3 distribution/build.py
335- sed -i '/^RUN pip install --no-cache llama-stack ==/d' distribution/Containerfile
341+ sed -i '/^RUN.* pip install.*ogx ==/d' distribution/Containerfile
336342
337343 - name : Set up QEMU
338344 uses : docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
@@ -354,7 +360,7 @@ jobs:
354360 file : distribution/Containerfile
355361 platforms : linux/amd64,linux/arm64
356362 push : true
357- tags : ${{ github.event_name == 'workflow_dispatch' && format('{0}:source-{1}-{2}', env.IMAGE_NAME, env.LLAMA_STACK_COMMIT_SHA , github.sha) || format('{0}:{1}{2}', env.IMAGE_NAME, github.sha, github.ref == 'refs/heads/main' && format(',{0}:latest', env.IMAGE_NAME) || (startsWith(github.ref, 'refs/heads/rhoai-v') && format(',{0}:{1}-latest', env.IMAGE_NAME, github.ref_name)) || '') }}
363+ tags : ${{ github.event_name == 'workflow_dispatch' && format('{0}:source-{1}-{2}', env.IMAGE_NAME, env.OGX_COMMIT_SHA , github.sha) || format('{0}:{1}{2}', env.IMAGE_NAME, github.sha, github.ref == 'refs/heads/main' && format(',{0}:latest', env.IMAGE_NAME) || (startsWith(github.ref, 'refs/heads/rhoai-v') && format(',{0}:{1}-latest', env.IMAGE_NAME, github.ref_name)) || '') }}
358364 cache-from : |
359365 type=gha,scope=build-amd64
360366 type=gha,scope=build-arm64
@@ -368,7 +374,7 @@ jobs:
368374 env :
369375 SLACK_WEBHOOK_URL : ${{ secrets.WH_SLACK_TEAM_LLS_CORE }}
370376 IMAGE_NAME : ${{ env.IMAGE_NAME }}
371- IMAGE_TAG : ${{ github.event_name == 'workflow_dispatch' && format('source-{0}-{1}', env.LLAMA_STACK_COMMIT_SHA , github.sha) || github.sha }}
377+ IMAGE_TAG : ${{ github.event_name == 'workflow_dispatch' && format('source-{0}-{1}', env.OGX_COMMIT_SHA , github.sha) || github.sha }}
372378 COMMIT_SHA : ${{ github.sha }}
373379 WORKFLOW_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
374380 run : |
@@ -377,13 +383,13 @@ jobs:
377383
378384 if [[ "${NOTIFY_FAILURE:-0}" == "1" ]]; then
379385 TEXT=$(printf '%s\n%s\n%s' \
380- ":failed: *Build failed for Llama Stack * - [${TIMESTAMP}]" \
386+ ":failed: *Build failed for OGX * - [${TIMESTAMP}]" \
381387 "Commit: ${COMMIT_SHA_SHORT}" \
382388 "<${WORKFLOW_URL}|View workflow run>")
383389 bash .github/actions/notify-slack/notify.sh "$TEXT" "#d00000"
384390 else
385391 TEXT=$(printf '%s\n%s\n%s\n%s' \
386- ":greenchecked: *New image is available for Llama Stack * - [${TIMESTAMP}]" \
392+ ":greenchecked: *New image is available for OGX * - [${TIMESTAMP}]" \
387393 "Image: ${IMAGE_NAME}:${IMAGE_TAG}" \
388394 "Commit: ${COMMIT_SHA_SHORT}" \
389395 "<${WORKFLOW_URL}|View workflow run>")
0 commit comments