Skip to content

Try

Try #1

Workflow file for this run

name: release-docker-image

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 95, Col: 12): Job 'docker-hub-release-arm64' depends on unknown job 'build-triton-wheel-arm64'., (Line: 152, Col: 9): Job 'docker-hub-release-manifest' depends on job 'docker-hub-release-arm64' which creates a cycle in the dependency graph., (Line: 202, Col: 12): Job 'github-release' depends on job 'docker-hub-release-manifest' which creates a cycle in the dependency graph.
on:
push:
tags:
- '*'
env:
IMAGE: zappi/vllm-openai
jobs:
build-triton-wheel:
strategy:
matrix:
config:
- {runs_on: 'ubuntu-22.04', arch: 'x86_64'}
- {runs_on: 'ubuntu-22.04-arm', arch: 'aarch64'}
runs-on: ${{ matrix.config.runs_on }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
repository: triton-lang/triton
ref: v3.3.1
- name: Patch setup
run: |
echo "[build_ext]" >> python/setup.cfg
echo "base-dir=/project" >> python/setup.cfg
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL: "dnf install clang lld -y"
CIBW_BUILD: "cp312-manylinux_${{ matrix.config.arch }}"
CIBW_ENVIRONMENT: "MAX_JOBS=4 TRITON_BUILD_WITH_CLANG_LLD=1"
with:
package-dir: python
output-dir: wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: triton-wheels
path: ./wheelhouse/*.whl
docker-hub-release-amd64:
runs-on: ubuntu-latest
concurrency: amd64
outputs:
image-digest: ${{ steps.build.outputs.digest }}
image-tags: ${{ steps.metadata.outputs.tags }}
steps:
- name: Free additional disk space
run: |
df -h
echo "Removing android..."
sudo rm -rf /usr/local/lib/android
echo "Removing dotnet..."
sudo rm -rf /usr/share/dotnet
echo "Removing haskell"
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
echo "Removing tool cache..."
sudo rm -rf /opt/hostedtoolcache
df -h
- name: Checkout
uses: actions/checkout@v5
- name: Prepare image metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=ref,event=tag,suffix=-amd64
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build, tag, and push image
id: build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.amd64
labels: ${{ steps.metadata.outputs.labels }}
platforms: linux/amd64
push: true
tags: ${{ steps.metadata.outputs.tags }}
docker-hub-release-arm64:
runs-on: ubuntu-latest
needs: build-triton-wheel-arm64
concurrency: arm64
outputs:
image-digest: ${{ steps.build.outputs.digest }}
image-tags: ${{ steps.metadata.outputs.tags }}
steps:
- name: Free additional disk space
run: |
df -h
echo "Removing android..."
sudo rm -rf /usr/local/lib/android
echo "Removing dotnet..."
sudo rm -rf /usr/share/dotnet
echo "Removing haskell"
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
echo "Removing tool cache..."
sudo rm -rf /opt/hostedtoolcache
df -h
- name: Checkout
uses: actions/checkout@v5
- name: Download a single artifact
uses: actions/download-artifact@v5
with:
name: triton-wheels-linux-arm64
path: ./wheelhouse/
- name: Prepare image metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=ref,event=tag,suffix=-arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build, tag, and push image
id: build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.arm64
labels: ${{ steps.metadata.outputs.labels }}
platforms: linux/arm64
push: true
tags: ${{ steps.metadata.outputs.tags }}
docker-hub-release-manifest:
runs-on: ubuntu-latest
needs:
- docker-hub-release-amd64
- docker-hub-release-arm64
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Prepare image metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=ref,event=pr
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Create and push multi-arch manifest
run: |
# Extract the main tag (without architecture suffix)
MAIN_TAGS="${{ steps.metadata.outputs.tags }}"
# Get architecture-specific tags from previous jobs
AMD64_TAGS="${{ needs.docker-hub-release-amd64.outputs.image-tags }}"
ARM64_TAGS="${{ needs.docker-hub-release-arm64.outputs.image-tags }}"
# Extract the first tag from each architecture
AMD64_TAG=$(echo "$AMD64_TAGS" | head -n1)
ARM64_TAG=$(echo "$ARM64_TAGS" | head -n1)
# Create and push manifest for each main tag
echo "$MAIN_TAGS" | while read -r TAG; do
if [ -n "$TAG" ]; then
echo "Creating manifest for $TAG"
docker buildx imagetools create -t "$TAG" "$AMD64_TAG" "$ARM64_TAG"
fi
done
- name: Update description on Docker Hub
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: ${{ env.IMAGE }}
github-release:
runs-on: ubuntu-latest
needs: docker-hub-release-manifest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Version ${{ github.ref }}
draft: false
prerelease: false