Harpyia/Dockerfile
Sviatoslav Tsariov e89122cb76 Implemented new architecture
Created message service responsible for searching the prompts inside the recognized text and sending it to the client.

Created recognizer with two strategies: whisper and Dany's fast whisper.

Implemented file stack which works in the separated thread, sends the file to the recognizer and after that sends the message to the client (Rat, for example).
2024-03-19 19:01:36 +03:00

23 lines
566 B
Docker

FROM python:3.10-slim
ENV FLASK_APP=src/app.py
ARG PIP_REQ_FILE=requirements.txt
WORKDIR /app
RUN apt update && apt install git ffmpeg -y && \
pip3 install "git+https://github.com/openai/whisper.git"
RUN whisper --model medium --language ru dummy.wav; exit 0 && \
whisper --model small --language ru dummy.wav; exit 0
COPY src/ src/
# Separate requirements installation to keep other dependencies
# in cache
COPY ${PIP_REQ_FILE} ${PIP_REQ_FILE}
RUN pip3 install -r ${PIP_REQ_FILE}
EXPOSE 5000
CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"]