feat: add ROCm (AMD GPU) and Intel GPU support (v0.2.12)
New image variants:
- :rocm — InsightFace via ROCmExecutionProvider, SigLIP via PyTorch ROCm 6.3
- :intel — InsightFace via OpenVINOExecutionProvider (onnxruntime-openvino);
Intel GPU compute runtime auto-installed from Intel graphics repo;
OPENVINO_DEVICE=GPU opts into Arc/iGPU inference (default: CPU)
Also adds:
- pyproject-rocm.toml + uv-rocm.lock, pyproject-intel.toml + uv-intel.lock
- compose.yml device passthrough snippets for AMD and Intel
- CI: build-rocm and build-intel jobs in docker-publish.yml; all four
variants built and tagged in release.yml
- README reworked: cleaner structure, GPU variant quick-start examples,
OPENVINO_DEVICE env var documented
- CHANGELOG entry and version bump to 0.2.12
Fix: IntPrompt in dict literal was eagerly evaluated in the no-embedding
fallback path of _get_strategy_choice, prompting users for a custom count
regardless of which strategy they picked.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -199,3 +199,127 @@ jobs:
|
||||
-f visibility=public || true
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-rocm:
|
||||
name: Build ROCm / AMD GPU (amd64)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Free up disk space
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo rm -rf "/usr/local/share/boost"
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
echo "Disk space freed."
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Determine ROCm image tag
|
||||
id: rocm-tag
|
||||
run: |
|
||||
if [ "${{ github.ref_name }}" = "dev" ]; then
|
||||
echo "tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev-rocm" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:rocm" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Build and push ROCm image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
build-args: VARIANT=rocm
|
||||
cache-from: type=gha,scope=linux/amd64-rocm
|
||||
cache-to: type=gha,mode=max,scope=linux/amd64-rocm
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
push: true
|
||||
tags: ${{ steps.rocm-tag.outputs.tag }}
|
||||
|
||||
- name: Inspect ROCm image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.rocm-tag.outputs.tag }}
|
||||
|
||||
- name: Ensure package is public
|
||||
run: |
|
||||
gh api -X PATCH /user/packages/container/winnow \
|
||||
-f visibility=public || true
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-intel:
|
||||
name: Build Intel GPU (amd64)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Free up disk space
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo rm -rf "/usr/local/share/boost"
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
echo "Disk space freed."
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Determine Intel image tag
|
||||
id: intel-tag
|
||||
run: |
|
||||
if [ "${{ github.ref_name }}" = "dev" ]; then
|
||||
echo "tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev-intel" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tag=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:intel" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Build and push Intel image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
build-args: VARIANT=intel
|
||||
cache-from: type=gha,scope=linux/amd64-intel
|
||||
cache-to: type=gha,mode=max,scope=linux/amd64-intel
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
push: true
|
||||
tags: ${{ steps.intel-tag.outputs.tag }}
|
||||
|
||||
- name: Inspect Intel image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.intel-tag.outputs.tag }}
|
||||
|
||||
- name: Ensure package is public
|
||||
run: |
|
||||
gh api -X PATCH /user/packages/container/winnow \
|
||||
-f visibility=public || true
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -118,15 +118,57 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push GPU image (latest)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
cache-from: type=gha,scope=release-gpu
|
||||
cache-to: type=gha,mode=max,scope=release-gpu
|
||||
tags: |
|
||||
ghcr.io/sudolulo/winnow:latest
|
||||
ghcr.io/sudolulo/winnow:${{ steps.tag.outputs.TAG }}
|
||||
|
||||
- name: Build and push CPU image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: VARIANT=cpu
|
||||
push: true
|
||||
cache-from: type=gha,scope=release-cpu
|
||||
cache-to: type=gha,mode=max,scope=release-cpu
|
||||
tags: |
|
||||
ghcr.io/sudolulo/winnow:cpu
|
||||
ghcr.io/sudolulo/winnow:${{ steps.tag.outputs.TAG }}-cpu
|
||||
|
||||
- name: Build and push ROCm image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
build-args: VARIANT=rocm
|
||||
push: true
|
||||
cache-from: type=gha,scope=release-rocm
|
||||
cache-to: type=gha,mode=max,scope=release-rocm
|
||||
tags: |
|
||||
ghcr.io/sudolulo/winnow:rocm
|
||||
ghcr.io/sudolulo/winnow:${{ steps.tag.outputs.TAG }}-rocm
|
||||
|
||||
- name: Build and push Intel image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
build-args: VARIANT=intel
|
||||
push: true
|
||||
cache-from: type=gha,scope=release-intel
|
||||
cache-to: type=gha,mode=max,scope=release-intel
|
||||
tags: |
|
||||
ghcr.io/sudolulo/winnow:intel
|
||||
ghcr.io/sudolulo/winnow:${{ steps.tag.outputs.TAG }}-intel
|
||||
|
||||
Reference in New Issue
Block a user