Running roop-unleashed in a docker container #626
Replies: 4 comments 6 replies
-
Thanks for your work on a docker image, I'd be happy to include a docker install script once this is successful. I'm pretty sure, the app doesn't use Qt anywhere but opencv headless sounds like a logical choice anyway. I believe you can get a lot of help and inspiration out of this repo because it's a also a fork of roop. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/C0untFloyd/roop-unleashed/blob/main/Dockerfile |
Beta Was this translation helpful? Give feedback.
-
i did see that but I think I had problems with the cuda driver.
…On Tue, Aug 20, 2024, 16:58 C0untFloyd ***@***.***> wrote:
docker build -t roop-unleashed .
https://github.com/C0untFloyd/roop-unleashed/blob/main/Dockerfile
—
Reply to this email directly, view it on GitHub
<#626 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APQXP6GKRVTISXFDOYVD5E3ZSLSJLAVCNFSM6AAAAABKGAGLGOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZZGE4TQMI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
when I map the volume like so:
volumes:
- somefolder:/output
it throws off an error that the device is busy. not a big deal because I
can download anyway instead of opening the folder. thanks for the reply.
…On Thu, Aug 22, 2024, 18:40 C0untFloyd ***@***.***> wrote:
Sorry I'm not using Docker myself, the code was donated by pull request.
Anyway, what exactly is your issue? The files can't be written into the
output folder or did I misunderstand you?
—
Reply to this email directly, view it on GitHub
<#626 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APQXP6E5HNRCEOQFZIGXXGTZSWPWRAVCNFSM6AAAAABKGAGLGOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBRGY3DGOI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Trying to install roop-unleashed in a docker container with some success but with a few weird errors along the way
To Reproduce
I'm running docker on linux and using an Ubuntu 22.04 based container from [ghcr.io/linuxserver/webtop:ubuntu-kde] and passing in the GPU with:
--gpus=all
--device /dev/dri:/dev/dri
Then install all the nvidia dependencies as per:
Install nvidia repos
sudo apt update; sudo apt -y upgrade
sudo apt install -y --no-install-recommends gnupg2 curl ca-certificates
curl -fsSLO https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
Update repos and in case keyring is out of date
sudo apt update; sudo apt -y upgrade
Install cuda dependencias
sudo apt install cuda-toolkit-11-8 cudnn9-cuda-11
Add envs to bash
nano ~/.bashrc
cut and paste into .bashrc
export PATH=$PATH:~/.local/bin
export PATH=$PATH:/usr/local/nvidia/bin:/usr/local/cuda/bin
export LD_LIBRARY_PATH=/usr/local/cuda-11/lib64:/usr/local/cuda-11.8/lib64
Restart container
Install roop
git clone https://github.com/C0untFloyd/roop-unleashed
cd roop-unleashed
pip install -r requirements.txt
Install correct runtime
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.15.1
I can then run up roop with python3 run.py. I get a weird error which ends with [Aborted (core dumped)] but in fact the roop service IS running in the background:
*** ERROR ***
QObject::moveToThread: Current thread (0x570d7f3ab330) is not the object's thread (0x570d7f3dd610).
Cannot move to target thread (0x570d7f3ab330)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/config/.local/lib/python3.10/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
Aborted (core dumped)
*** ERROR ***
I also get the following warning when I use roop, although doesn't appear to affect anything (??)
*** ERROR ***
(run.py:812): dbind-WARNING **: 16:08:19.741: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
*** ERROR ***
On researching the qt plugin error I discovered the following suggestion:
#fix xcb qt plugin issue (doesn't work)
pip uninstall opencv-python
pip install opencv-python-headless
However installing both packages does better:
#fix xcb qt plugin issue (works)
pip uninstall opencv-python
pip uninstall opencv-python-headless
pip install opencv-python
pip install opencv-python-headless
I then get a permissions issue on a dot file:
*** ERROR ***
QStandardPaths: wrong permissions on runtime directory /config/.XDG, 0755 instead of 0700
*** ERROR ***
Which is easily fixed with:
chmod 700 ~/.XDG
Hopefully the above info is useful for anyone else planning to run roop in a container, but welcome to any suggestions if I'm doing something daft, and why I'm getting the weird errors...
Thanks
Details
What OS are you using?
Are you using a GPU?
Which version of roop unleashed are you using?
3.6.7
Screenshots
If applicable, add screenshots to help explain your problem.
Beta Was this translation helpful? Give feedback.
All reactions