Skip to content

error when running the examples on codespaces #325

@makerGeek

Description

@makerGeek

When I try to run the voice assistant example on github codespaces, upon the execution of python minimal_assistant.py download-files
I get the following error :

python minimal_assistant.py download-files
{"asctime": "2024-05-27 18:26:13,005", "level": "INFO", "name": "livekit.agents", "message": "Downloading files for <livekit.plugins.deepgram.DeepgramPlugin object at 0x7b7d8a435030>"}
{"asctime": "2024-05-27 18:26:13,005", "level": "INFO", "name": "livekit.agents", "message": "Finished downloading files for <livekit.plugins.deepgram.DeepgramPlugin object at 0x7b7d8a435030>"}
{"asctime": "2024-05-27 18:26:13,005", "level": "INFO", "name": "livekit.agents", "message": "Downloading files for <livekit.plugins.elevenlabs.ElevenLabsPlugin object at 0x7b7d8a436050>"}
{"asctime": "2024-05-27 18:26:13,005", "level": "INFO", "name": "livekit.agents", "message": "Finished downloading files for <livekit.plugins.elevenlabs.ElevenLabsPlugin object at 0x7b7d8a436050>"}
{"asctime": "2024-05-27 18:26:13,005", "level": "INFO", "name": "livekit.agents", "message": "Downloading files for <livekit.plugins.openai.OpenAIPlugin object at 0x7b7d8a436e60>"}
{"asctime": "2024-05-27 18:26:13,005", "level": "INFO", "name": "livekit.agents", "message": "Finished downloading files for <livekit.plugins.openai.OpenAIPlugin object at 0x7b7d8a436e60>"}
{"asctime": "2024-05-27 18:26:13,005", "level": "INFO", "name": "livekit.agents", "message": "Downloading files for <livekit.plugins.silero.SileroPlugin object at 0x7b7d89471ba0>"}
Using cache found in /home/codespace/.cache/torch/hub/snakers4_silero-vad_master
Traceback (most recent call last):
  File "/workspaces/agents/examples/voice-assistant/minimal_assistant.py", line 43, in <module>
    cli.run_app(WorkerOptions(request_fnc))
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/livekit/agents/cli/cli.py", line 191, in run_app
    cli()
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/livekit/agents/cli/cli.py", line 188, in download_files
    plugin.download_files()
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/livekit/plugins/silero/__init__.py", line 29, in download_files
    _ = torch.hub.load(
  File "/home/codespace/.local/lib/python3.10/site-packages/torch/hub.py", line 568, in load
    model = _load_local(repo_or_dir, model, *args, **kwargs)
  File "/home/codespace/.local/lib/python3.10/site-packages/torch/hub.py", line 594, in _load_local
    hub_module = _import_module(MODULE_HUBCONF, hubconf_path)
  File "/home/codespace/.local/lib/python3.10/site-packages/torch/hub.py", line 106, in _import_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/codespace/.cache/torch/hub/snakers4_silero-vad_master/hubconf.py", line 5, in <module>
    from utils_vad import (init_jit_model,
  File "/home/codespace/.cache/torch/hub/snakers4_silero-vad_master/utils_vad.py", line 2, in <module>
    import torchaudio
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/torchaudio/__init__.py", line 2, in <module>
    from . import _extension  # noqa  # usort: skip
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/torchaudio/_extension/__init__.py", line 38, in <module>
    _load_lib("libtorchaudio")
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/torchaudio/_extension/utils.py", line 60, in _load_lib
    torch.ops.load_library(path)
  File "/home/codespace/.local/lib/python3.10/site-packages/torch/_ops.py", line 1032, in load_library
    ctypes.CDLL(path)
  File "/usr/local/python/3.10.13/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libtorch_cuda.so: cannot open shared object file: No such file or directory

Anyone knows the cause behind this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions