From 6d8baa7cac4d6520e21867b9076a1227f1123ff7 Mon Sep 17 00:00:00 2001 From: aptalca Date: Sun, 13 Mar 2022 14:48:34 -0400 Subject: [PATCH] make sure it installs on arm32v7 --- .../cont-init.d/98-mediadc-dependency-install | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/root/etc/cont-init.d/98-mediadc-dependency-install b/root/etc/cont-init.d/98-mediadc-dependency-install index 2c04961..e51d922 100644 --- a/root/etc/cont-init.d/98-mediadc-dependency-install +++ b/root/etc/cont-init.d/98-mediadc-dependency-install @@ -1,33 +1,42 @@ #!/usr/bin/with-contenv bash -echo "**** Installing required packages ****" +ALPINE_VER=$(cat /etc/apk/repositories | grep main | sed 's|.*alpine/v||' | sed 's|/main.*||') +if [ "${ALPINE_VER}" = "3.14" ]; then + PIP_ARGS="-f https://wheel-index.linuxserver.io/alpine/" +else + PIP_ARGS="-f https://wheel-index.linuxserver.io/alpine-${ALPINE_VER}/" +fi +echo "**** Installing required packages ****" apk add --no-cache \ ffmpeg \ imagemagick \ supervisor \ py3-numpy \ py3-pillow \ - py3-asn1crypto; + py3-asn1crypto echo "**** Installing optional packages ****" - apk add --no-cache \ py3-cffi \ py3-scipy \ py3-pynacl \ py3-cryptography \ - py3-pip; + py3-pip +if [ $(arch) = "armv7l" ]; then + echo "**** Installing build deps for pillow_heif on arm32v7, compiling pillow_heif may take a long time in the next step ****" + apk add --no-cache \ + python3-dev \ + libtool \ + git \ + gcc \ + m4 \ + perl \ + alpine-sdk \ + cmake +fi -python3 -m pip install -U pip - - -python3 -m pip install pillow_heif - -pip install hexhamming - -echo "**** Installing pywavelets if architecture is not ARM ****" - -arch=$(arch | sed s/x86_64/amd64/) && \ - python3 -m pip install pywavelets \ No newline at end of file +echo "**** Installing pillow_heif, hexhamming and pywavelets ****" +python3 -m pip install -U pip wheel setuptools +python3 -m pip install ${PIP_ARGS} pillow_heif hexhamming pywavelets