diff --git a/.github/workflows/release-docker-intel-xpu-nightly.yml b/.github/workflows/release-docker-intel-xpu-nightly.yml new file mode 100644 index 000000000..bdede32a3 --- /dev/null +++ b/.github/workflows/release-docker-intel-xpu-nightly.yml @@ -0,0 +1,55 @@ +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=9 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 }}" + + - name: Push intel/sglang-dev + run: | + docker push "intel/sglang-dev:${{ env.IMAGE_TAG }}"