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 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 .