From 54f933b4e801c9338ef8f14d0701f1850e02aa57 Mon Sep 17 00:00:00 2001 From: Vladimir Sitnikov Date: Wed, 17 Jun 2026 12:50:24 +0300 Subject: [PATCH 1/2] fix: skip onnxruntime-openvino on non-x86_64 platforms PyPI has only x86_64 wheels for onnxruntime-openvino and no source distributions, so arm64 builds failed unconditionally. Make the install a no-op on aarch64 and other non-x86_64 architectures. Tested locally: linux/arm64 CPU image builds and passes --help. Co-Authored-By: Claude Sonnet 4.6 --- libs/infinity_emb/Docker.template.yaml | 2 +- libs/infinity_emb/Dockerfile.cpu_auto | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/infinity_emb/Docker.template.yaml b/libs/infinity_emb/Docker.template.yaml index 68d6c7580..aadc749ff 100644 --- a/libs/infinity_emb/Docker.template.yaml +++ b/libs/infinity_emb/Docker.template.yaml @@ -24,7 +24,7 @@ cpu: # "RUN poetry install --no-interaction --no-ansi --no-root --extras \"${EXTRAS}\" --without lint,test && poetry cache clear pypi --all" COPY requirements_install_from_poetry.sh requirements_install_from_poetry.sh RUN ./requirements_install_from_poetry.sh --no-root --without lint,test "https://download.pytorch.org/whl/cpu" - RUN poetry run python -m pip install --no-cache-dir onnxruntime-openvino + RUN if [ "$(uname -m)" = "x86_64" ]; then poetry run python -m pip install --no-cache-dir onnxruntime-openvino; else echo "onnxruntime-openvino not available on $(uname -m), skipping"; fi extra_env_variables: | # Sets default to onnx ENV INFINITY_ENGINE="optimum" diff --git a/libs/infinity_emb/Dockerfile.cpu_auto b/libs/infinity_emb/Dockerfile.cpu_auto index cd16d9db7..e2d79d0fc 100644 --- a/libs/infinity_emb/Dockerfile.cpu_auto +++ b/libs/infinity_emb/Dockerfile.cpu_auto @@ -42,14 +42,14 @@ COPY poetry.lock poetry.toml pyproject.toml README.md /app/ # "RUN poetry install --no-interaction --no-ansi --no-root --extras \"${EXTRAS}\" --without lint,test && poetry cache clear pypi --all" COPY requirements_install_from_poetry.sh requirements_install_from_poetry.sh RUN ./requirements_install_from_poetry.sh --no-root --without lint,test "https://download.pytorch.org/whl/cpu" -RUN poetry run python -m pip install --no-cache-dir onnxruntime-openvino +RUN if [ "$(uname -m)" = "x86_64" ]; then poetry run python -m pip install --no-cache-dir onnxruntime-openvino; else echo "onnxruntime-openvino not available on $(uname -m), skipping"; fi COPY infinity_emb infinity_emb # Install dependency with infinity_emb package # "RUN poetry install --no-interaction --no-ansi --extras \"${EXTRAS}\" --without lint,test && poetry cache clear pypi --all" COPY requirements_install_from_poetry.sh requirements_install_from_poetry.sh RUN ./requirements_install_from_poetry.sh --without lint,test "https://download.pytorch.org/whl/cpu" -RUN poetry run python -m pip install --no-cache-dir onnxruntime-openvino +RUN if [ "$(uname -m)" = "x86_64" ]; then poetry run python -m pip install --no-cache-dir onnxruntime-openvino; else echo "onnxruntime-openvino not available on $(uname -m), skipping"; fi # # TODO: remove this line @@ -60,7 +60,7 @@ FROM builder AS testing # "RUN poetry install --no-interaction --no-ansi --extras \"${EXTRAS}\" --with lint,test && poetry cache clear pypi --all" COPY requirements_install_from_poetry.sh requirements_install_from_poetry.sh RUN ./requirements_install_from_poetry.sh --with lint,test "https://download.pytorch.org/whl/cpu" -RUN poetry run python -m pip install --no-cache-dir onnxruntime-openvino +RUN if [ "$(uname -m)" = "x86_64" ]; then poetry run python -m pip install --no-cache-dir onnxruntime-openvino; else echo "onnxruntime-openvino not available on $(uname -m), skipping"; fi # lint RUN poetry run ruff check . From 686b0b3fec7918efbdfee8209d97ff7774a16fdb Mon Sep 17 00:00:00 2001 From: Vladimir Sitnikov Date: Wed, 17 Jun 2026 12:17:07 +0300 Subject: [PATCH 2/2] chore: add publication for linux/arm64 for -cpu containers Fixes https://github.com/michaelfeil/infinity/issues/616 --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fba149f20..a2926ac5f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: dockerfile: libs/infinity_emb/Dockerfile.cpu_auto image: michaelf34/infinity appendix_tag: "-cpu" - platforms: "linux/amd64" + platforms: "linux/amd64,linux/arm64" secrets: inherit # Container to large for github action