Skip to content

Commit d9e5208

Browse files
authored
Add Github ARM runner & fix flaky tests (#605)
Build arm docker image with github arm runner, this will speed up the build process. Fixed rollout e2e test adding new condition. Signed-off-by: ffais <[email protected]>
1 parent 3601933 commit d9e5208

File tree

3 files changed

+94
-10
lines changed

3 files changed

+94
-10
lines changed

.github/workflows/build-push-kubeai.yml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
IMAGE_NAME: kubeai-project/kubeai
1616

1717
jobs:
18-
kubeai:
18+
kubeai-amd:
1919
runs-on: ubuntu-latest
2020
# Timeout to address Github actions stuck scenarios.
2121
timeout-minutes: 60
@@ -26,8 +26,8 @@ jobs:
2626
steps:
2727
- name: Checkout repository
2828
uses: actions/checkout@v5
29-
- name: Set up QEMU
30-
uses: docker/setup-qemu-action@v3
29+
# - name: Set up QEMU
30+
# uses: docker/setup-qemu-action@v3
3131
- name: Set up Docker Buildx
3232
uses: docker/setup-buildx-action@v3
3333
- name: Log in to the Container registry
@@ -49,7 +49,47 @@ jobs:
4949
uses: docker/build-push-action@v6
5050
with:
5151
context: .
52-
platforms: linux/amd64,linux/arm64
52+
platforms: linux/amd64
53+
push: ${{ github.event_name == 'push' }}
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}
56+
cache-from: type=gha
57+
cache-to: type=gha,mode=max
58+
kubeai-arm:
59+
runs-on: ubuntu-24.04-arm
60+
# Timeout to address Github actions stuck scenarios.
61+
timeout-minutes: 60
62+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
63+
permissions:
64+
contents: read
65+
packages: write
66+
steps:
67+
- name: Checkout repository
68+
uses: actions/checkout@v5
69+
# - name: Set up QEMU
70+
# uses: docker/setup-qemu-action@v3
71+
- name: Set up Docker Buildx
72+
uses: docker/setup-buildx-action@v3
73+
- name: Log in to the Container registry
74+
if: github.event_name == 'push'
75+
uses: docker/login-action@v3
76+
with:
77+
registry: ${{ env.REGISTRY }}
78+
username: ${{ github.actor }}
79+
password: ${{ secrets.GITHUB_TOKEN }}
80+
81+
- name: Extract metadata (tags, labels) for Docker
82+
id: meta
83+
uses: docker/metadata-action@v5
84+
with:
85+
images: |
86+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
87+
88+
- name: Build and push Docker image
89+
uses: docker/build-push-action@v6
90+
with:
91+
context: .
92+
platforms: linux/arm64
5393
push: ${{ github.event_name == 'push' }}
5494
tags: ${{ steps.meta.outputs.tags }}
5595
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/build-push-model-loader.yml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
IMAGE_NAME: kubeai-project/kubeai-model-loader
1616

1717
jobs:
18-
kubeai-model-loader:
18+
kubeai-model-loader-amd:
1919
runs-on: ubuntu-latest
2020
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
2121
permissions:
@@ -24,8 +24,8 @@ jobs:
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v5
27-
- name: Set up QEMU
28-
uses: docker/setup-qemu-action@v3
27+
# - name: Set up QEMU
28+
# uses: docker/setup-qemu-action@v3
2929
- name: Set up Docker Buildx
3030
uses: docker/setup-buildx-action@v3
3131
- name: Log in to the Container registry
@@ -53,7 +53,51 @@ jobs:
5353
uses: docker/build-push-action@v6
5454
with:
5555
context: ./components/model-loader
56-
platforms: linux/amd64,linux/arm64
56+
platforms: linux/amd64
57+
push: ${{ github.event_name == 'push' }}
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
kubeai-model-loader-arm:
63+
runs-on: ubuntu-24.04-arm
64+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
65+
permissions:
66+
contents: read
67+
packages: write
68+
steps:
69+
- name: Checkout repository
70+
uses: actions/checkout@v5
71+
# - name: Set up QEMU
72+
# uses: docker/setup-qemu-action@v3
73+
- name: Set up Docker Buildx
74+
uses: docker/setup-buildx-action@v3
75+
- name: Log in to the Container registry
76+
if: github.event_name == 'push'
77+
uses: docker/login-action@v3
78+
with:
79+
registry: ${{ env.REGISTRY }}
80+
username: ${{ github.actor }}
81+
password: ${{ secrets.GITHUB_TOKEN }}
82+
83+
# - name: Login to docker.io
84+
# if: github.event_name == 'push'
85+
# uses: docker/login-action@v3
86+
# with:
87+
# username: ${{ vars.DOCKERHUB_USERNAME }}
88+
# password: ${{ secrets.DOCKERHUB_TOKEN }}
89+
- name: Extract metadata (tags, labels) for Docker
90+
id: meta
91+
uses: docker/metadata-action@v5
92+
with:
93+
images: |
94+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
95+
# ${{ env.IMAGE_NAME }}
96+
- name: Build and push Docker image
97+
uses: docker/build-push-action@v6
98+
with:
99+
context: ./components/model-loader
100+
platforms: linux/arm64
57101
push: ${{ github.event_name == 'push' }}
58102
tags: ${{ steps.meta.outputs.tags }}
59103
labels: ${{ steps.meta.outputs.labels }}

test/e2e/rollouts/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ NEW_MODEL_NAME=${NEW_MODEL_URL#ollama://}
3737
kubectl patch model deepseek-r1-1.5b-cpu --type=merge -p "{\"spec\": {\"url\": \"$NEW_MODEL_URL\"}}"
3838

3939
check_pod_gone() {
40-
! kubectl get pod $DEEPSEEK_POD | grep -q "Running"
40+
! kubectl get pod $DEEPSEEK_POD | grep -q -E "Running|Terminating"
4141
}
4242

4343
# Make a request to the model
@@ -83,4 +83,4 @@ echo "Making a request to verify the model is available..."
8383
curl http://localhost:8000/openai/v1/completions \
8484
--max-time 900 \
8585
-H "Content-Type: application/json" \
86-
-d '{"model": "deepseek-r1-1.5b-cpu", "prompt": "Who was the first president of the United States?", "max_tokens": 40}'
86+
-d '{"model": "deepseek-r1-1.5b-cpu", "prompt": "Who was the first president of the United States?", "max_tokens": 40}'

0 commit comments

Comments
 (0)