Skip to content

Migrate vLLM Ray Serve Container #17

Migrate vLLM Ray Serve Container

Migrate vLLM Ray Serve Container #17

Workflow file for this run

name: Example Workflow
on:
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
vllm-rayserve-ec2: ${{ steps.changes.outputs.vllm-rayserve-ec2 }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
- name: Detect file changes
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
vllm-rayserve-ec2:
- "docker/vllm/Dockerfile.rayserve"
build-vllm-rayserve-ec2-image:
needs: [check-changes]
if: needs.check-changes.outputs.vllm-rayserve-ec2 == 'true'
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
outputs:
image_uri: ${{ steps.export.outputs.image_uri }}
steps:
- uses: actions/checkout@v5
- run: .github/scripts/runner_setup.sh
- run: .github/scripts/buildkitd.sh
- name: Build vllm-rayserve-ec2 image
id: build
shell: bash
run: |
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
IMAGE_TAG=${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/ci:vllm-0.10.2-gpu-py312-cu128-ubuntu22.04-rayserve-ec2-pr-${{ github.event.pull_request.number }}
docker buildx build --progress plain \
--build-arg CACHE_REFRESH="$(date +"%Y-%m-%d")" \
--cache-to=type=inline \
--cache-from=type=registry,ref="$IMAGE_TAG" \
--tag "$IMAGE_TAG" \
--target vllm-rayserve-ec2 \
-f docker/vllm/Dockerfile.rayserve .
docker push "$IMAGE_TAG"
docker rmi "$IMAGE_TAG"
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
- name: Export output
id: export
run: echo "image_uri=$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Debug local
run: |
echo "Local GITHUB_OUTPUT contents:"
cat $GITHUB_OUTPUT || echo "No output file found"
echo "Local step output: ${{ steps.export.outputs.image_uri }}"
test-job1:
needs: [build-vllm-rayserve-ec2-image]
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
if: always()
steps:
- name: Check received output
run: |
echo "Received job output: ${{ needs.build-vllm-rayserve-ec2-image.outputs.image_uri }}"
if [ -z "${{ needs.build-vllm-rayserve-ec2-image.outputs.image_uri }}" ]; then
echo "❌ Output is missing!"
else
echo "✅ Output received successfully."
fi
test-job2:
needs: [build-vllm-rayserve-ec2-image]
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-g6xl-runner
if: always()
steps:
- name: Check received output
run: |
echo "Received job output: ${{ needs.build-vllm-rayserve-ec2-image.outputs.image_uri }}"
if [ -z "${{ needs.build-vllm-rayserve-ec2-image.outputs.image_uri }}" ]; then
echo "❌ Output is missing!"
else
echo "✅ Output received successfully."
fi
# test-vllm-rayserve-ec2-image:
# needs: [build-vllm-rayserve-ec2-image]
# if: needs.build-vllm-rayserve-ec2-image.result == 'success'
# runs-on:
# - codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
# fleet:x86-g6xl-runner
# steps:
# - uses: actions/checkout@v5
# - name: Use built image
# run: |
# IMAGE_URI=${{ needs.build-vllm-rayserve-ec2-image.outputs.image_uri }}
# echo "Testing image: $IMAGE_URI"
# 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
# docker pull "$IMAGE_URI"
# docker run --rm "$IMAGE_URI" python -c "import torch; import ray; import vllm; print('Test OK')"