alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
882 stars 243 forks source link

Vosk docker image shutting down after starting #168

Closed Demacr closed 2 years ago

Demacr commented 2 years ago

When I run docker image it starts but then stops with Killed message. I checked htop for memory burst, but it's okay, it had a lot of free memory.

# docker run --rm -d -p 2700:2700 alphacep/kaldi-ru:latest
LOG (VoskAPI:ReadDataFiles():model.cc:213) Decoding params beam=13 max-active=7000 lattice-beam=6
LOG (VoskAPI:ReadDataFiles():model.cc:216) Silence phones 1:2:3:4:5:6:7:8:9:10
LOG (VoskAPI:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 1 orphan nodes.
LOG (VoskAPI:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 2 orphan components.
LOG (VoskAPI:Collapse():nnet-utils.cc:1488) Added 1 components, removed 2
LOG (VoskAPI:CompileLooped():nnet-compile-looped.cc:345) Spent 0.861873 seconds in looped compilation.
LOG (VoskAPI:ReadDataFiles():model.cc:248) Loading i-vector extractor from /opt/vosk-model-ru/model/ivector/final.ie
LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:204) Done.
LOG (VoskAPI:ReadDataFiles():model.cc:278) Loading HCLG from /opt/vosk-model-ru/model/graph/HCLG.fst
LOG (VoskAPI:ReadDataFiles():model.cc:293) Loading words from /opt/vosk-model-ru/model/graph/words.txt
LOG (VoskAPI:ReadDataFiles():model.cc:302) Loading winfo /opt/vosk-model-ru/model/graph/phones/word_boundary.int
LOG (VoskAPI:ReadDataFiles():model.cc:309) Loading subtract G.fst model from /opt/vosk-model-ru/model/rescore/G.fst
LOG (VoskAPI:ReadDataFiles():model.cc:311) Loading CARPA model from /opt/vosk-model-ru/model/rescore/G.carpa
LOG (VoskAPI:ReadDataFiles():model.cc:317) Loading RNNLM model from /opt/vosk-model-ru/model/rnnlm/final.raw

The Killed message I saw when run CMD command inside container (i.e. run container with -it & bash as command)

nshmyrev commented 2 years ago

Docker has its own memory restriction, you might need to increase memory for the docker

https://docs.docker.com/config/containers/resource_constraints/

Demacr commented 2 years ago

Ty for your reply. Will see attached link.

nshmyrev commented 2 years ago

Related to issue #77

Demacr commented 2 years ago

Yeah, ty, I looked for similar but missed this one. It is OOM Killer issue, I doesn't have enough of RAM. Found in dmesg output.