DeepFaceLab_Linux icon indicating copy to clipboard operation
DeepFaceLab_Linux copied to clipboard

Training uses CPU instead of GPU

Open Donvickins opened this issue 2 years ago • 2 comments

System details

Ubuntu 22.04 RTX 2080 With max Q design, Intel i9 9th Gen, 32gb ddr4 ram.

nvidia-smi

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.113.01             Driver Version: 535.113.01   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 2080 ...    Off | 00000000:01:00.0 Off |                  N/A |
| N/A   44C    P0              15W /  90W |      6MiB /  8192MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2308      G   /usr/lib/xorg/Xorg                            4MiB |
+---------------------------------------------------------------------------------------+

Cuda Version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

This command python -c "import tensorflow as tf;print(tf.__version__) gives the output below:

2023-10-24 17:31:49.074963: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2.4.0

When ever I run any script, I get this before the script runs

usage: conda [-h] [--no-plugins] [-V] COMMAND ...
conda: error: argument COMMAND: invalid choice: 'activate' (choose from 'clean', 'compare', 'config', 'create', 'info', 'init', 'install', 'list',
 'notices', 'package', 'remove', 'uninstall', 'rename', 'run', 'search', 'update', 'upgrade', 'build', 'content-trust', 'convert', 'debug', 'develop',
 'doctor', 'index', 'inspect', 'metapackage', 'render', 'skeleton', 'server', 'token', 'repo', 'verify', 'pack', 'env')

How do I make this work with the GPU?

Donvickins avatar Oct 24 '23 16:10 Donvickins

install env conda create -n deepfacelab -c main python=3.7 cudnn=7.6.5 cudatoolkit=10.1.243

my requirements file DeepFaceLab/requirements-cuda.txt

tqdm
numpy==1.16.1
numexpr
h5py==2.10.0
opencv-python==4.1.0.25
ffmpeg-python==0.1.17
scikit-image==0.14.2
scipy==1.4.1
colorama
tensorflow-gpu==2.3.1
pyqt5

chwshuang avatar Mar 11 '24 07:03 chwshuang

For those who use RTX 30xx series. conda create -n deepfacelab -c main python=3.7 conda-forge::cudnn=8.2.1 conda-forge::cudatoolkit=11 conda activate deepfacelab git clone --depth 1 https://github.com/nagadit/DeepFaceLab_Linux.git cd DeepFaceLab_Linux git clone --depth 1 https://github.com/iperov/DeepFaceLab.git Edit ./DeepFaceLab/requirements-cuda.txt: tqdm numpy==1.19.3 numexpr h5py==3.1.0 opencv-python==4.1.0.25 ffmpeg-python==0.1.17 scikit-image==0.14.2 scipy==1.4.1 colorama tensorflow-gpu==2.5.0 pyqt5 tf2onnx==1.9.3 python -m pip install -r ./DeepFaceLab/requirements-cuda.txt Run python -c "import tensorflow as tf;print(tf.version)"

armeanco avatar Jul 28 '24 08:07 armeanco