whisper-cpp-server
whisper-cpp-server copied to clipboard
Illegal instruction (core dumped)
Running whisper-cpp-server docker image in a kubernetes cluster as a microservice. I'm attaching the models folder via extending the docker image like this:
FROM litongjava/whisper-cpp-server:1.0.0
ADD models/ models/
which seems to work pretty well. Then, in my kubernetes deployment, I'm translating the docker run
command provided in the docs:
containers:
- name: whisper
image: jonnyburkholder/whisper
stdin: true
tty: true
command: ["/app/whisper_http_server_base_httplib"]
args: ["-m", "$(MODEL_PATH)"]
ports:
- containerPort: 8080
This loads the model, then exits immediately with the following output:
- dev:deployment/whisper: container whisper terminated with exit code 132
- dev:pod/whisper-c994db857-vp7t8: container whisper terminated with exit code 132
> [whisper-c994db857-vp7t8 whisper] whisper_init_from_file_with_params_no_state: loading model from 'models/ggml-tiny.en-q5_1.bin'
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: loading model
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_vocab = 51864
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_audio_ctx = 1500
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_audio_state = 384
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_audio_head = 6
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_audio_layer = 4
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_text_ctx = 448
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_text_state = 384
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_text_head = 6
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_text_layer = 4
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_mels = 80
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: ftype = 9
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: qntvr = 1
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: type = 1 (tiny)
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: adding 1607 extra tokens
> [whisper-c994db857-vp7t8 whisper] whisper_model_load: n_langs = 99
- dev:deployment/whisper failed. Error: container whisper terminated with exit code 132.
I've assumed that the container exits because the docker image is being run in the background and not actively doing work in the container. So to keep it from from exiting early, I modified the command to include writing to dev/null:
containers:
- name: whisper
image: jonnyburkholder/whisper
stdin: true
tty: true
command: ["/bin/sh", "-c"]
args: ["/app/whisper_http_server_base_httplib -m $(MODEL_PATH); tail -f /dev/null"]
ports:
- containerPort: 8080
This keeps the container alive, but gives me the error "Illegal instruction (core dumped)". This output pops up from the logs every few seconds
[whisper] whisper_init_from_file_with_params_no_state: loading model from 'models/ggml-tiny.en-q5_1.bin'
[whisper] whisper_model_load: loading model
[whisper] whisper_model_load: n_vocab = 51864
[whisper] whisper_model_load: n_audio_ctx = 1500
[whisper] whisper_model_load: n_audio_state = 384
[whisper] whisper_model_load: n_audio_head = 6
[whisper] whisper_model_load: n_audio_layer = 4
[whisper] whisper_model_load: n_text_ctx = 448
[whisper] whisper_model_load: n_text_state = 384
[whisper] whisper_model_load: n_text_head = 6
[whisper] whisper_model_load: n_text_layer = 4
[whisper] whisper_model_load: n_mels = 80
[whisper] whisper_model_load: ftype = 9
[whisper] whisper_model_load: qntvr = 1
[whisper] whisper_model_load: type = 1 (tiny)
[whisper] whisper_model_load: adding 1607 extra tokens
[whisper] whisper_model_load: n_langs = 99
[whisper] Illegal instruction (core dumped)
I'm using the ggml-tiny.en-q5_1
model. I've tested it with the docker run
command on the command line, and it works fine from there. I'm having trouble understanding why it isn't working in my cluster, however. Any insight into why this doesn't work would be appreciated. Thanks!