Hello everyone, I'm facing an issue when serving ...
# ask-for-help
a
Hello everyone, I'm facing an issue when serving my runner in production with this command
docker run -it --rm -p 3000:3000 speech_to_text_pipeline:625ppgtyncs4shqa serve --production --api-workers 2
with the following config:
Copy code
runners:
  timeout: 900
Here's the stacktrace:
Copy code
oml/bento/")
/usr/local/lib/python3.9/site-packages/whisper/transcribe.py:78: UserWarning: FP16 is not supported on CPU; using FP32 instead
  warnings.warn("FP16 is not supported on CPU; using FP32 instead")
2022-12-10T09:03:04+0000 [INFO] [runner:audio_transcriber:1] Service loaded from Bento directory: bentoml.Service(tag="speech_to_text_pipeline:625ppgtyncs4shqa", path="/home/bentoml/bento/")
2022-12-10T09:03:05+0000 [ERROR] [api_server:1] Exception on /process_uploaded_file [POST] (trace=06f36a5b34a7b888995d95d1623b8501,span=3ea1c21bc2188692,sampled=0)
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/server/http_app.py", line 324, in api_func
    output = await api.func(input_data)
  File "/home/bentoml/bento/src/service.py", line 69, in process_uploaded_file
    transcript = await runner_audio_transcriber.transcribe_audio.async_run(path)
  File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/runner/runner.py", line 53, in async_run
    return await self.runner._runner_handle.async_run_method(  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/bentoml/_internal/runner/runner_handle/remote.py", line 160, in async_run_method
    async with <http://self._client.post|self._client.post>(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
does anyone have a clue on how to solve this? 🙏 I read on some GitHub issue that this could be solved by setting a larger timeout, but this didn't have an impact on my runners (Maybe I'm not setting the configuration properly, here's the bentofile.yaml )
Copy code
service: "service.py:svc"
include:
  - "service.py"
  - "runners/__init__.py"
  - "runners/video_downloader.py"
  - "runners/audio_transcriber.py"
  - "runners/keyword_extractor.py"
  - "runners/entity_extractor.py"
  - "runners/sentiment_extractor.py"
  - "configuration.yaml"
python:
  requirements_txt: "../requirements.txt"
docker: 
  distro: debian
  system_packages:
    - git
    - ffmpeg
  setup_script: "setup.sh"
  env:
      BENTOML_CONFIG: "src/configuration.yaml"
166 Views