transcribe-anything: Problem with start on docker

I’m trying to install the module on a docker image, I took this one Nvidia Cuda 12.1 I also tried with countless other nvidia docker images, with various versions of cuda and cudnn

I installed python3.11 and python3-pip

Obviously I had to install cudnn9 since the docker image did not have it with this command: apt-get -y install cudnn9-cuda-12

I had to run this command too because the cuda libraries are installed in another folder export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}

Initially I also had a problem with the cusparsel libraries that I solved by installing this: cuSPARSELt 0.7.1

Now when i try this command : transcribe-anything https://www.youtube.com/watch?v=dQw4w9WgXcQ --device insane

I have this error :

 root@af40d80ba6ab:/# transcribe-anything https://www.youtube.com/watch?v=dQw4w9WgXcQ --device insane
{
    "cuda_available": true,
    "cuda_devices": [
        {
            "device_id": 1,
            "multiprocessors": 64,
            "name": "NVIDIA RTX A5000",
            "vram": 25294995456
        },
        {
            "device_id": 0,
            "multiprocessors": 64,
            "name": "NVIDIA RTX A5000",
            "vram": 25285623808
        }
    ],
    "num_cuda_devices": 2
}
Running transcribe_audio on https://www.youtube.com/watch?v=dQw4w9WgXcQ
Running:
  yt-dlp --get-title https://www.youtube.com/watch?v=dQw4w9WgXcQ
making dir text_Rick Astley - Never Gonna Give You Up (Official Music Video)
Using temporary directory /tmp/tmpwjiz2_ix
Running:
  yt-dlp --no-check-certificate https://www.youtube.com/watch?v=dQw4w9WgXcQ -o "out.%(ext)s"
[youtube] Extracting URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading webpage
[youtube] dQw4w9WgXcQ: Downloading tv client config
[youtube] dQw4w9WgXcQ: Downloading player b191cf34
[youtube] dQw4w9WgXcQ: Downloading tv player API JSON
[youtube] dQw4w9WgXcQ: Downloading ios player API JSON
[youtube] dQw4w9WgXcQ: Downloading m3u8 information
[info] dQw4w9WgXcQ: Downloading 1 format(s): 616+251
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 39
[download] Destination: out.f616.mp4
[download] 100% of   94.86MiB in 00:00:04 at 19.48MiB/s
[download] Destination: out.f251.webm
[download] 100% of    3.28MiB in 00:00:00 at 30.60MiB/s
[Merger] Merging formats into "out.webm"
Deleting original file out.f616.mp4 (pass -k to keep)
Deleting original file out.f251.webm (pass -k to keep)
Downloaded file:  /tmp/tmpwjiz2_ix/out.webm
Running:
  static_ffmpeg -y -i /tmp/tmpwjiz2_ix/out.webm -filter:a speechnorm=e=12.5:r=0.00001:l=1 -acodec pcm_s16le -ar 44100 -ac 1 /tmp/tmpbzgr895b.wav
Downloading complete.
#####################################
####### INSANE GPU MODE! ############
#####################################
Using device insane
Running whisper on /tmp/tmp42o36ei2.wav (will install models on first run)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/cuda_available.py", line 145, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/cuda_available.py", line 129, in main
    cuda_info = cuda_cards_available()
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/cuda_available.py", line 83, in cuda_cards_available
    import torch  # type: ignore
    ^^^^^^^^^^^^
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/venv/insanely_fast_whisper/.venv/lib/python3.11/site-packages/torch/__init__.py", line 405, in <module>
    from torch._C import *  # noqa: F403
    ^^^^^^^^^^^^^^^^^^^^^^
ImportError: /usr/local/lib/python3.10/dist-packages/transcribe_anything/venv/insanely_fast_whisper/.venv/lib/python3.11/site-packages/torch/lib/libtorch_cuda.so: undefined symbol: ncclCommRegister
/usr/local/lib/python3.10/dist-packages/iso_env/run.py:36: UserWarning: Failed to run: ['/usr/local/bin/uv', 'run', '--project', '/usr/local/lib/python3.10/dist-packages/transcribe_anything/venv/insanely_fast_whisper', '/usr/local/lib/python3.10/dist-packages/transcribe_anything/cuda_available.py', '-o', '/tmp/tmp1t6gubsf/stdout.txt'] 1
stdout: None
stderr: None
  warnings.warn(error_msg)
Error: [Errno 2] No such file or directory: '/tmp/tmp1t6gubsf/stdout.txt'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/_cmd.py", line 197, in main
    transcribe(
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/api.py", line 245, in transcribe
    run_insanely_fast_whisper(
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/insanely_fast_whisper.py", line 210, in run_insanely_fast_whisper
    device_id = get_device_id()
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/insanely_fast_whisper.py", line 71, in get_device_id
    cuda_info = get_cuda_info()
  File "/usr/local/lib/python3.10/dist-packages/transcribe_anything/insanely_fast_whisper.py", line 57, in get_cuda_info
    stdout = temp.read_text(encoding="utf-8")
  File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp1t6gubsf/stdout.txt'

Update

On Windows it’s ok I tried on my ubuntu machine and got same error I tried on runpod.io with base image docker ubuntu:22.04 and i got this

Running transcribe_audio on https://www.youtube.com/watch?v=dQw4w9WgXcQ
Downloading https://github.com/zackees/ffmpeg_bins/raw/main/v5.0/linux.zip -> /root/.venv/lib/python3.10/site-packages/static_ffmpeg/bin/linux.zip
Download of https://github.com/zackees/ffmpeg_bins/raw/main/v5.0/linux.zip -> /root/.venv/lib/python3.10/site-packages/static_ffmpeg/bin/linux.zip completed.
Extracting /root/.venv/lib/python3.10/site-packages/static_ffmpeg/bin/linux.zip -> /root/.venv/lib/python3.10/site-packages/static_ffmpeg/bin
Running:
  yt-dlp --get-title https://www.youtube.com/watch?v=dQw4w9WgXcQ
making dir text_Rick Astley - Never Gonna Give You Up (Official Music Video)
Using temporary directory /tmp/tmp_1px520n
Running:
  yt-dlp --no-check-certificate https://www.youtube.com/watch?v=dQw4w9WgXcQ -o "out.%(ext)s"
[youtube] Extracting URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading webpage
[youtube] dQw4w9WgXcQ: Downloading tv client config
[youtube] dQw4w9WgXcQ: Downloading player b191cf34
[youtube] dQw4w9WgXcQ: Downloading tv player API JSON
[youtube] dQw4w9WgXcQ: Downloading ios player API JSON
[youtube] dQw4w9WgXcQ: Downloading m3u8 information
[info] dQw4w9WgXcQ: Downloading 1 format(s): 616+251
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 39
[download] Destination: out.f616.mp4
[download] 100% of   94.86MiB in 00:00:12 at 7.49MiB/s
[download] Destination: out.f251.webm
[download] 100% of    3.28MiB in 00:00:00 at 6.01MiB/s
[Merger] Merging formats into "out.webm"
Deleting original file out.f251.webm (pass -k to keep)
Deleting original file out.f616.mp4 (pass -k to keep)
Downloaded file:  /tmp/tmp_1px520n/out.webm
Running:
  static_ffmpeg -y -i /tmp/tmp_1px520n/out.webm -filter:a speechnorm=e=12.5:r=0.00001:l=1 -acodec pcm_s16le -ar 44100 -ac 1 /tmp/tmp55s0xube.wav
Downloading complete.
#####################################
####### INSANE GPU MODE! ############
#####################################
Using device insane
Running whisper on /tmp/tmpnp2n_us3.wav (will install models on first run)
Purging...
venv_path does not exist.
      Built project @ file:///root/.venv/lib/python3.10/site-packages/transcribe_anything/venv/insanely_fast_whisper
      Built antlr4-python3-runtime==4.9.3
      Built julius==0.2.7
      Built docopt==0.6.2
      Built srt==3.5.2
      Built safeio==1.2
      Built free-proxy==1.1.0
      Built langdetect==1.0.9
Installed 147 packages in 625ms
Traceback (most recent call last):
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/venv/insanely_fast_whisper/.venv/lib/python3.11/site-packages/torch/__init__.py", line 318, in _load_global_deps
    ctypes.CDLL(global_deps_lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/root/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^

OSError: libcudart.so.12: cannot open shared object file: No such file or directory

 
 During handling of the above exception, another exception occurred

 Traceback (most recent call last):

  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/cuda_available.py", line 145, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/cuda_available.py", line 129, in main
    cuda_info = cuda_cards_available()
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/cuda_available.py", line 83, in cuda_cards_available
    import torch  # type: ignore
    ^^^^^^^^^^^^
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/venv/insanely_fast_whisper/.venv/lib/python3.11/site-packages/torch/__init__.py", line 404, in <module>
    _load_global_deps()
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/venv/insanely_fast_whisper/.venv/lib/python3.11/site-packages/torch/__init__.py", line 362, in _load_global_deps
    _preload_cuda_deps(lib_folder, lib_name)
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/venv/insanely_fast_whisper/.venv/lib/python3.11/site-packages/torch/__init__.py", line 302, in _preload_cuda_deps
    raise ValueError(f"{lib_name} not found in the system path {sys.path}")
ValueError: libcublas.so.*[0-9] not found in the system path ['/root/.venv/lib/python3.10/site-packages/transcribe_anything', '/root/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python311.zip', '/root/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11', '/root/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib/python3.11/lib-dynload', '/root/.venv/lib/python3.10/site-packages/transcribe_anything/venv/insanely_fast_whisper/.venv/lib/python3.11/site-packages']
/root/.venv/lib/python3.10/site-packages/iso_env/run.py:36: UserWarning: Failed to run: ['/root/.venv/bin/uv', 'run', '--project', '/root/.venv/lib/python3.10/site-packages/transcribe_anything/venv/insanely_fast_whisper', '/root/.venv/lib/python3.10/site-packages/transcribe_anything/cuda_available.py', '-o', '/tmp/tmp52ro1apz/stdout.txt'] 1
stdout: None
stderr: None
  warnings.warn(error_msg)
Error: [Errno 2] No such file or directory: '/tmp/tmp52ro1apz/stdout.txt'
Traceback (most recent call last):
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/_cmd.py", line 197, in main
    transcribe(
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/api.py", line 245, in transcribe
    run_insanely_fast_whisper(
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/insanely_fast_whisper.py", line 210, in run_insanely_fast_whisper
    device_id = get_device_id()
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/insanely_fast_whisper.py", line 71, in get_device_id
    cuda_info = get_cuda_info()
  File "/root/.venv/lib/python3.10/site-packages/transcribe_anything/insanely_fast_whisper.py", line 57, in get_cuda_info
    stdout = temp.read_text(encoding="utf-8")
  File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp52ro1apz/stdout.txt'

The problem is ubuntu?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Problem solved with merge PR #32 and now you can use the docker image published in the PR #33

Happy coding