Open2

WSL2 + whisper

ikarugaikaruga

Windwos 11のWSL2でwhisperを動かそうとして断念した記録

3070だとcu116じゃないと対応してくれない
https://pytorch.org/get-started/locally/

$ pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116

https://docs.nvidia.com/cuda/wsl-user-guide/index.html
ホスト(windows)でGPUドライバ入ってればWSLのubuntu側でCUDA入れなくていいよ、っていうか入れるなって書いてある
https://qiita.com/ksasaki/items/ee864abd74f95fea1efa#最新情報-2022-06-15-時点

https://goody-jp.com/ubuntu20-04cuda11-2pytorch1-8-1cu111がrtx3090のgpuで動作した/

import torch

print(torch.__version__)
print(torch.cuda.is_available())
print(torch.cuda.device_count())
print(torch.cuda.current_device())
print(torch.cuda.get_device_name())
print(torch.cuda.get_device_name(torch.device('cuda:0')))
print(torch.cuda.get_device_name('cuda:0'))

cnDNNが必要そうだったので入れてみたんだけど、相変わらずエラーが出ちゃう

$ whisper test.mp3 --language Japanese
Could not load library libcudnn_cnn_infer.so.8. Error: libcuda.so: cannot open shared object file: No such file or directory
Please make sure libcudnn_cnn_infer.so.8 is in your library path!
fish: Job 1, 'whisper test.mp3…' terminated by signal SIGABRT (Abort)
ikarugaikaruga

WSL2を通さずにWindowsにPythonをインストールするところから初めて動いているのでVMとホストの間でCUDA周りがうまく連携できていなかったのでしょう。