From 3c2561e8d416ef252dad98f7ad47c17a255fec94 Mon Sep 17 00:00:00 2001 From: David Bebawy Date: Thu, 25 Jun 2026 14:38:08 -0400 Subject: [PATCH] Add legacy amd64 add-on image --- .github/workflows/publish.yml | 42 +++++++++++++++++++ addons/pipecat_assist/Dockerfile | 9 +++- .../constraints-legacy-amd64.txt | 2 + addons/pipecat_assist_legacy_amd64/DOCS.md | 13 ++++++ addons/pipecat_assist_legacy_amd64/README.md | 8 ++++ addons/pipecat_assist_legacy_amd64/build.yaml | 6 +++ .../pipecat_assist_legacy_amd64/config.yaml | 24 +++++++++++ 7 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 addons/pipecat_assist/constraints-legacy-amd64.txt create mode 100644 addons/pipecat_assist_legacy_amd64/DOCS.md create mode 100644 addons/pipecat_assist_legacy_amd64/README.md create mode 100644 addons/pipecat_assist_legacy_amd64/build.yaml create mode 100644 addons/pipecat_assist_legacy_amd64/config.yaml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index aa9b3c7..b86991a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,6 +11,7 @@ on: env: ARCHITECTURES: '["amd64", "aarch64"]' IMAGE_NAME: pipecat-assist + LEGACY_AMD64_IMAGE_NAME: pipecat-assist-legacy-amd64 REGISTRY_PREFIX: ghcr.io/${{ github.repository }} permissions: @@ -111,10 +112,51 @@ jobs: image-tags: ${{ steps.release.outputs.image_tags }} registry-prefix: ${{ env.REGISTRY_PREFIX }} + legacy-amd64: + name: Build legacy amd64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Prepare release tags + id: release + shell: bash + run: | + release_tag="${GITHUB_REF_NAME}" + if [[ "${{ github.event_name }}" == "release" ]]; then + release_tag="${{ github.event.release.tag_name }}" + fi + app_version="${release_tag#v}" + + { + echo "image_tags<> "${GITHUB_OUTPUT}" + echo "app_version=${app_version}" >> "${GITHUB_OUTPUT}" + - name: Build and push legacy amd64 image + uses: home-assistant/builder/actions/build-image@2026.06.0 + with: + arch: amd64 + build-args: | + BUILD_FROM=ghcr.io/home-assistant/amd64-base-debian:bookworm + LEGACY_AMD64_NUMPY=true + container-registry-password: ${{ secrets.GITHUB_TOKEN }} + context: addons/pipecat_assist + cosign: "true" + image: ${{ env.REGISTRY_PREFIX }}/${{ env.LEGACY_AMD64_IMAGE_NAME }} + image-tags: ${{ steps.release.outputs.image_tags }} + push: "true" + version: ${{ steps.release.outputs.app_version }} + github-release: name: Publish GitHub release needs: - manifest + - legacy-amd64 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest steps: diff --git a/addons/pipecat_assist/Dockerfile b/addons/pipecat_assist/Dockerfile index 0ee1f68..3ad22ab 100644 --- a/addons/pipecat_assist/Dockerfile +++ b/addons/pipecat_assist/Dockerfile @@ -3,6 +3,7 @@ FROM ${BUILD_FROM} ARG BUILD_VERSION=0.1.0 ARG BUILD_ARCH=amd64 +ARG LEGACY_AMD64_NUMPY=false ENV PIP_BREAK_SYSTEM_PACKAGES=1 \ PIP_NO_CACHE_DIR=1 \ @@ -25,8 +26,13 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* COPY pyproject.toml /tmp/pipecat_assist/pyproject.toml +COPY constraints-legacy-amd64.txt /tmp/pipecat_assist/constraints-legacy-amd64.txt COPY app/ /tmp/pipecat_assist/app/ -RUN pip3 install /tmp/pipecat_assist \ +RUN if [ "${LEGACY_AMD64_NUMPY}" = "true" ]; then \ + pip3 install --constraint /tmp/pipecat_assist/constraints-legacy-amd64.txt /tmp/pipecat_assist; \ + else \ + pip3 install /tmp/pipecat_assist; \ + fi \ && rm -rf /tmp/pipecat_assist COPY app/ /app/ @@ -42,4 +48,3 @@ LABEL \ WORKDIR / CMD ["/run.sh"] - diff --git a/addons/pipecat_assist/constraints-legacy-amd64.txt b/addons/pipecat_assist/constraints-legacy-amd64.txt new file mode 100644 index 0000000..92adc76 --- /dev/null +++ b/addons/pipecat_assist/constraints-legacy-amd64.txt @@ -0,0 +1,2 @@ +# Keep NumPy on the pre-x86-64-v2 wheel line for older amd64 CPUs. +numpy<2.0 diff --git a/addons/pipecat_assist_legacy_amd64/DOCS.md b/addons/pipecat_assist_legacy_amd64/DOCS.md new file mode 100644 index 0000000..2270630 --- /dev/null +++ b/addons/pipecat_assist_legacy_amd64/DOCS.md @@ -0,0 +1,13 @@ +# Pipecat Assist Legacy amd64 Documentation + +This is the older-CPU amd64 variant of Pipecat Assist. It exists for systems +where the standard amd64 image crashes during startup with: + +```text +RuntimeError: NumPy was built with baseline optimizations: +(X86_V2) but your machine doesn't support: +(X86_V2). +``` + +Configuration and usage are otherwise the same as the standard Pipecat Assist +add-on. diff --git a/addons/pipecat_assist_legacy_amd64/README.md b/addons/pipecat_assist_legacy_amd64/README.md new file mode 100644 index 0000000..f15834a --- /dev/null +++ b/addons/pipecat_assist_legacy_amd64/README.md @@ -0,0 +1,8 @@ +# Pipecat Assist Legacy amd64 + +Use this add-on on older amd64 Home Assistant hosts that fail to start the +standard Pipecat Assist add-on with a NumPy `X86_V2` CPU baseline error. + +This variant is built from the same Pipecat Assist source as the standard +add-on, but constrains NumPy to a wheel line compatible with older x86_64 CPUs. +Use the standard add-on on newer amd64 systems and on aarch64. diff --git a/addons/pipecat_assist_legacy_amd64/build.yaml b/addons/pipecat_assist_legacy_amd64/build.yaml new file mode 100644 index 0000000..4969e47 --- /dev/null +++ b/addons/pipecat_assist_legacy_amd64/build.yaml @@ -0,0 +1,6 @@ +build_from: + amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm +args: + BUILD_VERSION: "{version}" + BUILD_ARCH: "{arch}" + LEGACY_AMD64_NUMPY: "true" diff --git a/addons/pipecat_assist_legacy_amd64/config.yaml b/addons/pipecat_assist_legacy_amd64/config.yaml new file mode 100644 index 0000000..7733556 --- /dev/null +++ b/addons/pipecat_assist_legacy_amd64/config.yaml @@ -0,0 +1,24 @@ +name: Pipecat Assist Legacy amd64 +version: "0.1.74" +slug: pipecat_assist_legacy_amd64 +description: Realtime Pipecat assistant for older amd64 CPUs without x86-64-v2 support. +url: https://github.com/kyvaith/pipecat-homeassistant +image: ghcr.io/kyvaith/pipecat-homeassistant/pipecat-assist-legacy-amd64 +arch: + - amd64 +init: false +startup: application +boot: auto +host_network: true +ingress: true +ingress_port: 7860 +panel_icon: mdi:account-voice +homeassistant_api: true +hassio_api: true +hassio_role: manager +options: + runner_port: 7860 + log_level: "INFO" +schema: + runner_port: port + log_level: list(DEBUG|INFO|WARNING|ERROR)