deepfakes / faceswap

Deepfakes Software For All
https://www.faceswap.dev
GNU General Public License v3.0
50.54k stars 13.07k forks source link

docker can not use GPU #1244

Open xiaosefengyun opened 2 years ago

xiaosefengyun commented 2 years ago

Using the docker-gpu of the latest master branch of faceswap, when running to python faceswap/faceswap.py train -A aobamadst -B trupdst -m model/ it is found that nvidia-smi in docker is basically not used, and the cpu usage rate is 100% image image

xiaosefengyun commented 2 years ago

It likes https://forum.faceswap.dev/viewtopic.php?t=2052

torzdf commented 2 years ago

I don't use Docker. The images tend to get updated by the community. I'm tagging @rushic24 who PR'd related #1232 in case he has any insights. In the meantime, please post the output of the following:

From inside your virtual environment, inside your faceswap folder, run:

python -c "from lib.sysinfo import sysinfo ; print(sysinfo)"

and post output

kwxiaozhu commented 2 years ago

@xiaosefengyun Because the base image nvidia/cuda:11.7.0-runtime-ubuntu18.04 do not installed the libcudnn8. docker exec -it inside the docker and run apt-get install libcudnn8=8.2.4.15-1+cuda11.4 depend on your cuda version inside the docker,run apt-cache show libcudnn8
and find and install the proper version of libcudnn8,and then wil solve the problem.

0xrushi commented 2 years ago

Hey did you fix it? Whats your base nvidia and cuda version in the ubuntu OS? This dockerfile was for Arch, most probably @kwxiaozhu solution would work.