#!/usr/bin/with-contenv bash

echo "**** Installing required packages ****"

apk add --no-cache \
    ffmpeg \
    imagemagick \
    supervisor \
    py3-numpy \
    py3-pillow \
    py3-asn1crypto;

echo "**** Installing optional packages ****"

apk add --no-cache \
    py3-cffi \
    py3-scipy \
    py3-pynacl \
    py3-cryptography \
    py3-pip;


python3 -m pip install -U pip


python3 -m pip install pillow_heif


echo "**** Installing pywavelets if architecture is not ARM ****"

arch=$(arch | sed s/x86_64/amd64/) && \
    python3 -m pip install pywavelets