Skip to content

Commit

Permalink
enable telegram face in docker build; use cache mounting in Dockerfile;
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyBond committed Nov 26, 2022
1 parent b2aa962 commit b4f9faf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,19 @@ FROM python:3.9-slim-bullseye
# https://github.com/hofstadter-io/hof/commit/838e8bbe2171ba8b9929b0ffa812c0f1ed61e975#diff-185fff912be701240e6e971b5548217a2027904efe9e365728169da65eb4983b
RUN ln -s /bin/uname /usr/local/bin/uname

RUN --mount=type=cache,target=/var/cache apt update && apt install -y ffmpeg

RUN groupadd --gid 1001 python && useradd --create-home python --uid 1001 --gid python
USER python:python
WORKDIR /home/python

COPY ./requirements-docker.txt ./requirements.txt
RUN pip install -r ./requirements.txt
RUN --mount=type=cache,target=/home/python/.cache,uid=1001,gid=1001 pip install -r ./requirements.txt

COPY irene ./irene
COPY irene_plugin_web_face ./irene_plugin_web_face
COPY irene_plugin_web_face_frontend ./irene_plugin_web_face_frontend
COPY irene_plugin_telegram_face ./irene_plugin_telegram_face
COPY docker-config ./config

COPY --link --from=frontend-builder /home/frontend/dist/ ./irene_plugin_web_face_frontend/frontend-dist/
Expand Down
6 changes: 6 additions & 0 deletions requirements-docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ uvicorn~=0.18.3
uvicorn[standard]~=0.18.3
fastapi~=0.81.0
starlette~=0.19.1

# Telegram
pyTelegramBotAPI~=4.7.1

# Серверное распознание голоса
vosk~=0.3.7

0 comments on commit b4f9faf

Please sign in to comment.