diff --git a/.github/workflows/release-docker-intel-xpu-nightly.yml b/.github/workflows/release-docker-intel-xpu-nightly.yml index 287e262bd..1daef946c 100644 --- a/.github/workflows/release-docker-intel-xpu-nightly.yml +++ b/.github/workflows/release-docker-intel-xpu-nightly.yml @@ -1,57 +1,59 @@ -name: Release Docker Images Nightly (Intel XPU) -on: - workflow_dispatch: - schedule: - - cron: '0 12 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.number || github.sha }} - cancel-in-progress: true - -jobs: - publish: - if: github.repository == 'sgl-project/sglang' - runs-on: intel-bmg - environment: 'prod' - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set date and commit hash - id: image_meta - run: | - date_tag=$(date +%Y%m%d) - commit_hash=$(git rev-parse --short=7 HEAD) - if [ -z "${commit_hash}" ]; then - echo "::error::Could not resolve commit hash" - exit 1 - fi - image_tag="nightly-dev-xpu-bmg-${date_tag}-${commit_hash}" - echo "DATE=${date_tag}" >> $GITHUB_ENV - echo "commit_hash=${commit_hash}" >> $GITHUB_OUTPUT - echo "IMAGE_TAG=${image_tag}" >> $GITHUB_ENV - echo "Image tag: ${image_tag}" - - - name: Login to Docker Hub (Intel) - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_INTEL_USERNAME }} - password: ${{ secrets.DOCKERHUB_INTEL_TOKEN }} - - - name: Build intel/sglang-dev - run: | - echo "Building intel/sglang-dev:${{ env.IMAGE_TAG }}" - docker build . \ - -f docker/xpu.Dockerfile \ - --build-arg SG_LANG_REPO=https://github.com/sgl-project/sglang.git \ - --build-arg SG_LANG_BRANCH=main \ - --no-cache --progress=plain \ - -t "intel/sglang-dev:${{ env.IMAGE_TAG }}" \ - -t "intel/sglang-dev:latest" - - - name: Push intel/sglang-dev - run: | - docker push "intel/sglang-dev:${{ env.IMAGE_TAG }}" - docker push "intel/sglang-dev:latest" +name: Release Docker Images Nightly (Intel XPU) +on: + workflow_dispatch: + schedule: + - cron: '0 12 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +jobs: + publish: + if: github.repository == 'sgl-project/sglang' + runs-on: intel-bmg + environment: 'prod' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + path: sglang-nightly-build + fetch-depth: 0 + + - name: Set date and commit hash + id: image_meta + run: | + cd sglang-nightly-build + date_tag=$(date +%Y%m%d) + commit_hash=$(git rev-parse --short=7 HEAD) + if [ -z "${commit_hash}" ]; then + echo "::error::Could not resolve commit hash" + exit 1 + fi + image_tag="nightly-dev-xpu-bmg-${date_tag}-${commit_hash}" + echo "DATE=${date_tag}" >> $GITHUB_ENV + echo "commit_hash=${commit_hash}" >> $GITHUB_OUTPUT + echo "IMAGE_TAG=${image_tag}" >> $GITHUB_ENV + echo "Image tag: ${image_tag}" + + - name: Login to Docker Hub (Intel) + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_INTEL_USERNAME }} + password: ${{ secrets.DOCKERHUB_INTEL_TOKEN }} + + - name: Build intel/sglang-dev + run: | + echo "Building intel/sglang-dev:${{ env.IMAGE_TAG }}" + docker build sglang-nightly-build \ + -f sglang-nightly-build/docker/xpu.Dockerfile \ + --build-arg SG_LANG_REPO=https://github.com/sgl-project/sglang.git \ + --build-arg SG_LANG_BRANCH=main \ + --no-cache --progress=plain \ + -t "intel/sglang-dev:${{ env.IMAGE_TAG }}" \ + -t "intel/sglang-dev:latest" + + - name: Push intel/sglang-dev + run: | + docker push "intel/sglang-dev:${{ env.IMAGE_TAG }}" + docker push "intel/sglang-dev:latest"