faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

docker can not use GPU

Open xiaosefengyun opened this issue 2 years ago • 4 comments

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 avatar Jun 30 '22 06:06 xiaosefengyun

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

xiaosefengyun avatar Jun 30 '22 06:06 xiaosefengyun

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

torzdf avatar Jun 30 '22 09:06 torzdf

@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.

kwxiaozhu avatar Jul 05 '22 03:07 kwxiaozhu

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.

0xrushi avatar Jul 05 '22 03:07 0xrushi