Help with Decluttarr
-
My friend just shared the existence of this software with me, and it looks perfect for me. His setup uses docker though, and mine doesn't. The non-docker instructions seem simple enough, but I can't figure out how to install the requirements. The "pip install" complains and says I should use apt, but I can't find most of those requirements in my sources. For example "python3-verboselogs" isn't found. Can someone help? I'd love to get this running!
-
-
[email protected]replied to [email protected] last edited by
That's an Ubuntu thing. They prefer you use apt to install deps, but you don't absolutely need to. The PROPER way to work around this is starting a localized python virtual environment for your project directory. That is essentially sandboxing a python environment that only installs dependencies into the project directory and doesn't alter your system globally.
Lots of instructions on the steps to do this out there that should get you going in just a few minutes.
-
[email protected]replied to [email protected] last edited by
OK thanks. I will look into that. The fact that they are installed in a "sandbox"... will that prevent them from being accessible to the decluttarr script?
-
[email protected]replied to [email protected] last edited by
This happens inside whatever directory you have Decluttar in, and then the local venv runs decluttar
-
[email protected]replied to [email protected] last edited by
I don't understand a bit of this, but I got everything installed and running. Seems I have to 'activate' the venv and run the script from within it. Not sure how this works with the script auto running itself periodically, but I guess I will find out! Thanks for pointing me in the right direction.
-
[email protected]replied to [email protected] last edited by
Not being a Python developer myself I’d almost go the Docker route simply to avoid the hell that is Python package management.
While I can’t suggest anything specifically helpful (I’ve forgotten) I’d say check the project’s Dockerfile. It’ll give you an idea of how they’re handling it in Docker and it should give you an idea of what to do.
-
[email protected]replied to [email protected] last edited by
Every couple of years I try docker again. I just fail to wrap my head around it. I have a local friend who got it up and running though, so maybe I'll have him hold my hand through it.
-
[email protected]replied to [email protected] last edited by
https://stackoverflow.com/questions/3287038/cron-and-virtualenv
I haven't looked at the particulars of this applications, but if you path the python binary you use to run the application, it should use the environment that's with it, without being activated. Activate just prepends the path for that venv to every command you give from then on when you're working in a shell. And as noted in there, make sure you specify /bin/bash as your shell in cronjobs since it uses sh by default so you might run into issues in that context.
-
[email protected]replied to [email protected] last edited by
A virtual environment is just a copy of the python and pip binaries. When you activate the venv, the venv dirs temporarily get added to your path, so your regular python alias points to the binary in the venv (run
which python
with venv active to verify). Pip will install modules to a subdir of your venv.
It basically works like npm and the node_modules dir. -
[email protected]replied to [email protected] last edited by
On second read, maybe you already knew that.
-
[email protected]replied to [email protected] last edited by
Ahh so u can't install packages into system python unless u use apt. What u need to do is create a virtual environment (venve) then u can source that venve and install packages into that.
-
[email protected]replied to [email protected] last edited by
I know it's not helpful or what you're asking for but honestly, just learn docker and all of these kinds of problems just go away.
Once you learn to spin up one docker container, you can spin up nearly any of them (there's a couple of extra steps if you need GPU acceleration, things like that).
You'll be kicking yourself that you didn't hadn't the jump earlier. Sounds like you're already using Linux too, so it's really not that big a leap.
-
[email protected]replied to [email protected] last edited by
I've tried a few times, and have yet to fundamentally understand it. Been using Linux since 2007!
-
[email protected]replied to [email protected] last edited by
It would be easier for you to just learn docker. It's not complicated. Just do it.
-
[email protected]replied to [email protected] last edited by
Especially with anything requiring Python. I also isolate anything using node.
-
[email protected]replied to [email protected] last edited by
I guess I must be stupid, because I've tried a few times and never understood it. I tried projects like DockStarter.
-
[email protected]replied to [email protected] last edited by
You don't need to build a docker container from scratch, you just need to run one. It's infinitely less complicated.
-
[email protected]replied to [email protected] last edited by
I have a system that's been working well (except for this new thing I'm trying to add) for a couple years now. I am not looking yo replace it with docker (something that I have failed with in the past). Maybe next time my system breaks I'll take another look at docker.
-
[email protected]replied to [email protected] last edited by
Docker doesnt replace your current system. It just runs containers (which act like a separate system)
You can also try podman which wont silently rewrite your firewall rules without telling you... I'll never forgive docker for doing that
-
[email protected]replied to [email protected] last edited by
I think your failings with docker stem from a complete lack of understanding. It takes little to no effort and will replace nothing. You're causing yourself a lot more work, not just now but also I. The future, trying to do things the way you are. It shouldn't take more than 10 minutes to install docker, docker compose, and research the setting you need to add to a compose file before running it. As t that point you're done, no dependencies, no maintenance, need to update? Pull the new image and relaunch the container. Takes seconds.