From 5349db26993999fb9fd8243ad2c52bec1d1a5783 Mon Sep 17 00:00:00 2001 From: xingjianll <4396kevinliu@gmail.com> Date: Thu, 7 Nov 2024 20:55:56 -0500 Subject: [PATCH] add custom build workflow --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000000..f248ef0fc5f59 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build and Deploy + +on: workflow_dispatch + +env: + REGISTRY: ghcr.io + IMAGE_NAME: vllm +jobs: + build: + runs-on: self-hosted + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ github.repository }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + max_jobs=16 + USE_SCCACHE=1 + GIT_REPO_CHECK=1 + CUDA_VERSION=12.1.0 + target: build