|
76 | 76 | with: |
77 | 77 | name: vllm-ec2-image-uri |
78 | 78 | path: image_uri.txt |
| 79 | + |
| 80 | + regression-test: |
| 81 | + needs: [build-image] |
| 82 | + if: needs.build-image.result == 'success' |
| 83 | + runs-on: |
| 84 | + - codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }} |
| 85 | + fleet:x86-g6xl-runner |
| 86 | + steps: |
| 87 | + - name: Checkout DLC source |
| 88 | + uses: actions/checkout@v5 |
| 89 | + |
| 90 | + - name: ECR login |
| 91 | + run: | |
| 92 | + 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 |
| 93 | + |
| 94 | + - name: Download image URI artifact |
| 95 | + uses: actions/download-artifact@v4 |
| 96 | + with: |
| 97 | + name: vllm-ec2-image-uri |
| 98 | + |
| 99 | + - name: Resolve image URI for test |
| 100 | + run: | |
| 101 | + IMAGE_URI=$(cat image_uri.txt) |
| 102 | + echo "Resolved image URI: $IMAGE_URI" |
| 103 | + echo "IMAGE_URI=$IMAGE_URI" >> $GITHUB_ENV |
| 104 | + |
| 105 | + - name: Pull image |
| 106 | + run: | |
| 107 | + docker pull $IMAGE_URI |
| 108 | + |
| 109 | + - name: Checkout vLLM Tests |
| 110 | + uses: actions/checkout@v5 |
| 111 | + with: |
| 112 | + repository: vllm-project/vllm |
| 113 | + ref: v0.11.0 |
| 114 | + path: vllm_source |
| 115 | + |
| 116 | + - name: Start container |
| 117 | + run: | |
| 118 | + CONTAINER_ID=$(docker run -d -it --rm --gpus=all --entrypoint /bin/bash \ |
| 119 | + -v ${HOME}/.cache/huggingface:/root/.cache/huggingface \ |
| 120 | + -v ${HOME}/.cache/vllm:/root/.cache/vllm \ |
| 121 | + -v ./vllm_source:/workdir --workdir /workdir \ |
| 122 | + -e HUGGING_FACE_HUB_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }} \ |
| 123 | + ${IMAGE_URI}) |
| 124 | + echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV |
| 125 | + |
| 126 | + - name: Setup for vLLM Test |
| 127 | + run: | |
| 128 | + docker exec ${CONTAINER_ID} sh -c ' |
| 129 | + set -eux |
| 130 | + uv pip install --system -r requirements/common.txt -r requirements/dev.txt --torch-backend=auto |
| 131 | + uv pip install --system pytest pytest-asyncio |
| 132 | + uv pip install --system -e tests/vllm_test_utils |
| 133 | + uv pip install --system hf_transfer |
| 134 | + mkdir src |
| 135 | + mv vllm src/vllm |
| 136 | + ' |
| 137 | + |
| 138 | + - name: Run vLLM Tests |
| 139 | + run: | |
| 140 | + docker exec ${CONTAINER_ID} sh -c ' |
| 141 | + set -eux |
| 142 | + nvidia-smi |
| 143 | +
|
| 144 | + # Regression Test # 7min |
| 145 | + cd /workdir/tests |
| 146 | + uv pip install --system modelscope |
| 147 | + pytest -v -s test_regression.py |
| 148 | + ' |
| 149 | + |
| 150 | + - name: Cleanup container and images |
| 151 | + if: always() |
| 152 | + run: | |
| 153 | + docker rm -f ${CONTAINER_ID} || true |
| 154 | + docker image prune -a --force --filter "until=24h" |
| 155 | + docker system df |
0 commit comments