Comments (4)
Installing DLF on Linux for Noobs (like me)
Firstly thanks @nagadit for maintaining this repo, It helps a lot!
After a few days of research I was finally able to run DFL on linux with RTX3060 mobile GPU, anyone who is struggling with the same issue as I can follow these steps,
CPU => AMD Ryzen 9 5900HX with Radeon Graphics
GPU => Nvidia RTX-3060 Mobile GPU
OS => Ubuntu 21.10
Kernel=> 5.13.0-21-generic #21-Ubuntu SMP Tue Oct 19 08:59:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I tested multiple linux distros (Fedora,Manjaro,Garuda,mint etc) and the one that was working perfectly with minimum hassle for installation was ubuntu, I used 21.10 because 20.04(LTS) was missing drivers for my mediatek network card you can use that too if you wish.
I realised that the cudatoolkit and cudnn that i was trying to install via anaconda (apart from being outdated) was not able to detect my GPU, so I decided to install all directly to system, instead of using conda install cudatoolkit.
Step 1.) install proprietary nvidia drivers from repository,
for some reason the latest driver for my RTX was not working properly hence I installed a stable one by typing in shell,
sudo apt install nvidia-driver-470
once installed, reboot.
type in shell nvidia-smi
to verify installation
Step 2.) install cudatoolkit from repository,
**Important: If you install a cudatoolkit version that is not compatible with your driver it will automatically uninstall your currently installed nvidia driver.
check for version compatibility at https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
sudo apt install nvidia-cuda-toolkit
this for me installed 11.3 cuda which is indeed compatible with nvidia 470 driver,
once this is installed, reboot.
type in shell nvcc --version
to verify installation
Step 3.) install cudnn from nvidia official website,
for nvidia cudnn download, you will have to sign up for nvidia developers account and proceed with installation.
url: https://developer.nvidia.com/cudnn
be careful, cudnn should be compatible with the cuda version that we installed in previous step, so in by case the cudnn should be compatible with 11.3, which was 8.2.1.
choose a version that is compatible with your cuda version and download all three files .deb, i.e.
libcudnn8_8.2.1.32-1+cuda11.3_amd64.deb
libcudnn8-dev_8.2.1.32-1+cuda11.3_amd64.deb
libcudnn8-samples_8.2.1.32-1+cuda11.3_amd64.deb
install these with dpkg and reboot.
Step 4.) install anaconda
goto: https://www.anaconda.com/products/individual
download and install
Step 5.) setup conda environment
move to directory of your choice and type in shell,
conda create -n deepfacelab -c main python=3.9
conda activate deepfacelab
Note: removed cudnn and cudatoolkit as they are no longer required to be installed with conda
Step 6.) Initialize Deepfacelab environment
git clone --depth 1 https://github.com/nagadit/DeepFaceLab_Linux.git
cd DeepFaceLab_Linux
git clone --depth 1 https://github.com/iperov/DeepFaceLab.git
Step 7.) install python requirements
Open requirements-cuda.txt file by typing,
nano DeepFaceLab/requirements-cuda.txt
and change the requirements file to,
opencv-python==4.1.2.30
tensorflow-gpu
tqdm
numpy
numexpr
h5py
ffmpeg-python
scikit-image
scipy
colorama
pyqt5
tf2onnx
save and proceed to installation by typing in shell
python -m pip install -r ./DeepFaceLab/requirements-cuda.txt
Finally!!
Step 8.) changing env.sh file in scripts,
goto scripts by typing in shell,
cd scripts/
open env.sh,
nano env.sh
edit the following line,
export DFL_PYTHON="python3.7"
and replace 3.7 with 3.9,
export DFL_PYTHON="python3.9"
save and exit
Step 9.) Enjoy!!!!!
from deepfacelab_linux.
As a reminder for myself and a note for people wondering the opencv-python==4.1.2.30
in requirements-cuda.txt, if pip could not find opencv-python==4.1.2.30
, opencv-python-headless
is a feasible alternative (tested in wslg).
opencv-python
may induce load error in wlsg.https://github.com/NVlabs/instant-ngp/discussions/300
If Xseg editor cannot open display in wslg, check here https://github.com/microsoft/wslg/issues/558#issuecomment-1260817709.
from deepfacelab_linux.
I dont know, it's not working at all...
from deepfacelab_linux.
I have the same problem. I tried the proposed solution, but it doesn't solve the problem. In 5_Xseg_train.sh, the CPU is automatically selected.
from deepfacelab_linux.
Related Issues (20)
- only use cpu train SAEHD HOT 3
- Missing export scripts HOT 1
- Extremely outdated, not working currently, doesn't detect GPU HOT 13
- AMD gpu don't work HOT 2
- Can you please post a license? HOT 2
- Extracting face not working on GPU HOT 2
- Unworkable on modern cards e.g. 4090 or modern Distro's - Ubuntu 22.04 HOT 19
- Uses 100% CPU simultaneously with GPU HOT 4
- libtinfo.so.6: no version information available HOT 6
- 6_train_SAEHD.sh ----- TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type HOT 1
- 7_merge_Quick96.sh -- QObject::moveToThread: Current thread (0x813e8c0) is not the object's thread (0x64ff3f0). HOT 7
- SAEHD to DFM Error
- Training uses CPU instead of GPU HOT 1
- CondaError: Run 'conda init' before 'conda activate' HOT 1
- Failed to run "bash 1_clear_workspace.sh" HOT 4
- Incomplete instructions? HOT 1
- how to start after "bash 1_clear_workspace.sh"? HOT 3
- runing 7_merge_SAEHD, the model didn't work HOT 2
- CUDA_ERROR_ECC_UNCORRECTABLE: uncorrectable ECC error encountered HOT 1
- Blackscreen video HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepfacelab_linux.