Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] OSError:libtorch_cuda.so:cannot open shared file #1405

Open
2 of 7 tasks
Kulbuntu opened this issue Nov 14, 2024 · 1 comment
Open
2 of 7 tasks

[Issue] OSError:libtorch_cuda.so:cannot open shared file #1405

Kulbuntu opened this issue Nov 14, 2024 · 1 comment

Comments

@Kulbuntu
Copy link

Voice Changer Version

Clone from AMD Linux tutorial on github

Operational System

Ubuntu Jammy 22.04

GPU

RX 6800xt

CUDA Version

Rocm 5.7.2 AMD

Read carefully and check the options

  • If you use win_cuda_torch_cuda edition, setup cuda? see here
  • If you use win_cuda edition, setup cuda and cudnn? see here
  • If you use mac edition, client is not launched automatically. Use chrome to open application.?
  • I've tried to change the Chunk Size
  • I've tried to set the Index to zero
  • I've read the tutorial
  • I've tried to extract to another folder (or re-extract) the .zip file

Does pre-installed model work?

No

Model Type

MMVC

Issue Description

Hi guys actually I got this problem when I try to launch MMVCServer. Py. Indeed I've followed instruction in tutorial for more securities I've done virtual environments. Like it's written in the tutorial. My virtual environment use 3.10.9 pythons version. I use too RVC and it's works well. I've managed to make 2 models with it. For the first time I used to be able to upload a ONXX models then this error appears. Honestly I managed to solve fairseq error, pyworld and some other depedancies's problem but actually I'm stuck on this error. I run everytime the Py script in a venv. The most weird thing is the fact I manage to make it works yesterday then a crash in ubuntu's update to 24.04 fucled my partition and then it don't work at all. I'll try today some other python version. It's how i done for make RVC works(my problem on RVC was a fairseq conflit with omega conf, make a virtual env with pyenv with 3.8.9 python ver done the job :D. If you have some idea, I'll take it. Sorry guys for my bad English. I'll post today more details about this problem (console logs and screen).

Application Screenshot

No response

Logs on console

[Issue] OSError:libtorch_cuda.so:cannot open shared file:No file or such directory

@Kulbuntu
Copy link
Author

Hello guys, i managed to solve this problem. Indeed i saw in requirements.txt outdated depedance.
uvicorn==0.21.1 pyOpenSSL==23.1.1 numpy==1.23.5 torch==2.0.1 torchaudio==2.0.2 resampy==0.4.2 python-socketio==5.8.0 fastapi==0.95.1 python-multipart==0.0.6 onnxruntime-gpu==1.13.1 scipy==1.10.1 matplotlib==3.7.1 websockets==11.0.2 faiss-cpu==1.7.3 torchcrepe==0.0.18 librosa==0.9.1 gin==0.1.6 gin_config==0.5.0 einops==0.6.0 local_attention==1.8.5 websockets==11.0.2 sounddevice==0.4.6 dataclasses_json==0.5.7 onnxsim==0.4.28 torchfcpe==0.0.3
You can see in this code the problem. torchaudio==2.0.2 is outdated the good version for lastest Rocm is 2.5.1 torchaudio.
torch==2.0.1 is outdated too it don't work with Rocm 6.2.4 too, the good version is 2.5.1.
Numpy=1.23.5 => outdated i changed it to numpy it to numpy=1.26.3.

Then my new requirements.txt looks like this after theses modifications.
uvicorn==0.21.1 pyOpenSSL==23.1.1 numpy==1.26.3 torch==2.5.1 torchaudio==2.5.1 resampy==0.4.2 python-socketio==5.8.0 fastapi==0.95.1 python-multipart==0.0.6 onnxruntime-gpu==1.13.1 scipy==1.10.1 matplotlib==3.7.1 websockets==11.0.2 faiss-cpu==1.7.3 torchcrepe==0.0.18 librosa==0.9.1 gin==0.1.6 gin_config==0.5.0 einops==0.6.0 local_attention==1.8.5 websockets==11.0.2 sounddevice==0.4.6 dataclasses_json==0.5.7 onnxsim==0.4.28 torchfcpe==0.0.3
I used to have a fairseq installation problem too. So for solve my problem i've pay attention to what terminal said.
Terminal said pip version is too high, i was using pip version 24.3.1 so i downgrade it too using this command => python -m pip install pip==21.3.1 --upgrade
Then i done pip install fairseq and it worked without error.
For pyworld error i've done the same thing than for fairseq => pip install pyworld.
Also i installed last Rocm version with theses commands according AMD's instructions here => https://www.amd.com/fr/support/download/linux-drivers.html i looked to Radeon™ Software for Linux® version 24.20.3 for Ubuntu 22.04.5 HWE with ROCm 6.2.3 then i clicked on driver details.
Then i ran theses commands one by one
'sudo apt update
wget https://repo.radeon.com/amdgpu-install/6.2.3/ubuntu/jammy/amdgpu-install_6.2.60203-1_all.deb
sudo apt install ./amdgpu-install_6.2.60203-1_all.deb
sudo amdgpu-install -y --usecase=graphics,rocm
sudo usermod -a -G render,video $LOGNAME'
And now the problem is gone :D, i think my Rocm installation was incomplete too it takes many times to install it xD.
But even with a proper installation the problem was the same. I hope for you guys this theses little explanation will help some people issues.
With pleasure
Kulbuntu :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant