-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
when i run whisper model using flask app in gunicorn (in Docker). The transcription didn't work
from faster_whisper import WhisperModel
class WhisperTranscriber():
def __init__(self) -> None:
self.faster_whisper = WhisperModel('/app/apps/model/whisper_medium', device='cpu', compute_type="int8")
def transcribe(self, filepath):
# this part below stuck forever when run transcribe
segments, info = self.faster_whisper.transcribe(filepath, beam_size=5, word_timestamps=True)
for seg in segments:
print(seg.text)
however, when i run the script in a docker exec -it <container_name> /bin/bash and run python script the inference works well
the gunicorn config gunicorn-cfg.py is shown below
workers = 1
accesslog = "-"
loglevel = "debug"
capture_output = True
enable_stdio_inheritance = True
and the command when running docker
gunicorn --timeout 7200 --certfile=server.crt --keyfile=server.key --config gunicorn-cfg.py -b 0.0.0.0:5005 run:app
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels