Skip to content

Commit

Permalink
Move python dependencies to requirements.txt and pin them
Browse files Browse the repository at this point in the history
  • Loading branch information
definitio committed Jan 4, 2024
1 parent 6d066a5 commit e3c68dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ha-rhvoice-addon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ LABEL org.opencontainers.image.source=https://github.com/definitio/ha-rhvoice-ad
ARG BUILD_ARCH
ARG RUNTIME_PACKAGES="lame python3 locales opus-tools flac python3-setuptools"
ARG BUILD_PACKAGES="git python3-pip python3-wheel wget ca-certificates"
ARG PIP_PACKAGE="flask pymorphy2 pymorphy2-dicts-ru rhvoice-wrapper"

COPY requirements.txt /tmp/requirements.txt

RUN apt-get update -y \
&& apt-get -y install --no-install-recommends $RUNTIME_PACKAGES \
&& apt-mark manual $(apt-mark showauto) \
&& apt-get -y install --no-install-recommends $BUILD_PACKAGES \
&& cd /usr/share/locale/ && ls | grep -v 'ru\|en\|locale.alias' | xargs rm -rf \
&& locale-gen ru_RU.UTF-8 \
&& pip3 install $PIP_PACKAGE \
&& pip3 install -r /tmp/requirements.txt \
&& wget -q https://raw.githubusercontent.com/Aculeasis/ff/main/rhv_bin.py -O rhv_bin.py \
&& pip3 install $(python3 rhv_bin.py 0 0 data) \
&& pip3 install $(python3 rhv_bin.py linux $BUILD_ARCH) \
Expand Down
5 changes: 5 additions & 0 deletions ha-rhvoice-addon/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MarkupSafe~=2.1.3
flask~=3.0.0
pymorphy2~=0.9.1
pymorphy2-dicts-ru~=2.4.417127.4579844
rhvoice-wrapper

0 comments on commit e3c68dc

Please sign in to comment.