@@ -12,9 +12,11 @@ concurrency:
1212 group : pr-${{ github.event.pull_request.number }}
1313 cancel-in-progress : true
1414
15- jobs :
16- pre-commit :
15+ jobs :
16+ check-changes :
1717 runs-on : ubuntu-latest
18+ outputs :
19+ vllm-rayserve-ec2 : ${{ steps.changes.outputs.vllm-rayserve-ec2 }}
1820 steps :
1921 - uses : actions/checkout@v5
2022 - uses : actions/setup-python@v6
@@ -23,25 +25,28 @@ jobs:
2325 - uses : pre-commit/action@v3.0.1
2426 with :
2527 extra_args : --all-files
28+ - name : Detect file changes
29+ id : changes
30+ uses : dorny/paths-filter@v3
31+ with :
32+ filters : |
33+ vllm-rayserve-ec2:
34+ - "docker/vllm/Dockerfile.rayserve"
2635
27- example-on-default-runner :
28- needs : [pre-commit]
29- runs-on :
30- - codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
31- steps :
32- - uses : actions/checkout@v5
33- - run : .github/scripts/runner_setup.sh
34-
35- example-on-build-runner :
36- needs : [example-on-default-runner]
36+ build-vllm-rayserve-ec2-image :
37+ needs : [check-changes]
38+ if : needs.check-changes.outputs.vllm-rayserve-ec2 == 'true'
3739 runs-on :
3840 - codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
3941 fleet:x86-build-runner
42+ outputs :
43+ image_uri : ${{ steps.build.outputs.image_uri }}
4044 steps :
4145 - uses : actions/checkout@v5
4246 - run : .github/scripts/runner_setup.sh
4347 - run : .github/scripts/buildkitd.sh
44- - name : build vllm-rayserve-ec2 image
48+ - name : Build vllm-rayserve-ec2 image
49+ id : build
4550 shell : bash
4651 run : |
4752 aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
@@ -55,25 +60,20 @@ jobs:
5560 -f docker/vllm/Dockerfile.rayserve .
5661 docker push "$IMAGE_TAG"
5762 docker rmi "$IMAGE_TAG"
58-
59- example-on-g6xl-runner-1 :
60- needs : [example-on-build-runner]
61- runs-on :
62- - codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
63- fleet:x86-g6xl-runner
64- steps :
65- - uses : actions/checkout@v5
66- - run : .github/scripts/runner_setup.sh
67- - run : |
68- nvidia-smi
69-
70- example-on-g6xl-runner-2 :
71- needs : [example-on-build-runner]
63+ echo "image_uri="$IMAGE_TAG"" >> $GITHUB_OUTPUT
64+
65+ test-vllm-rayserve-ec2-image :
66+ needs : [build-vllm-rayserve-ec2-image]
67+ if : needs.build-vllm-rayserve-ec2-image.result == 'success'
7268 runs-on :
7369 - codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
7470 fleet:x86-g6xl-runner
7571 steps :
7672 - uses : actions/checkout@v5
77- - run : .github/scripts/runner_setup.sh
78- - run : |
79- nvidia-smi
73+ - name : Use built image
74+ run : |
75+ IMAGE_URI=${{ needs.build-vllm-rayserve-ec2-image.outputs.image_uri }}
76+ echo "Testing image: $IMAGE_URI"
77+ aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
78+ docker pull "$IMAGE_URI"
79+ docker run --rm "$IMAGE_URI" python -c "import torch; import ray; import vllm; print('Test OK')"
0 commit comments