R
RunPod•5mo ago
flick401

how to stop scripts from replacing my configuration

I have a version of ComfyUI together with a version of python and it's dependendencies in a direcotry named /workspace on a storage volume. Everytime this pre_start script runs it wipes out my lib and starts over. I tried modifying the script but it gets regenerated every time I restart the pod. How to stop this?
No description
67 Replies
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
@flick401 just to verify your issues is that you install custom nodes and on stop it gets wiped
flick401
flick401OP•5mo ago
No, my issue is that the comfy UI docker container runs a script called pre_start and replaces my python lib because it's outside of the mounted storage volume. I placed the python venv inside the workspace but now need that script to change path to /workspace/venv/python
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
#Better ComfyUI - CUDA12 my image solves this issue
flick401
flick401OP•5mo ago
So I'd have to do a fresh install with Better comfy? Could you explain what your image does and the name? I've been trying to install comfyui for a few days now using the available image SD comfyui @Madiator2011 (Work) . Is it loaded with all the custom nodes I need (ip adapter, was suite, idm vton)?
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
it does save venv to workspace and also it has lot of tools preinstalled that might be usefull for comfy ui
flick401
flick401OP•5mo ago
got it. I am deploying now
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
Let me know how it goes anlways happy to get some feedback
flick401
flick401OP•5mo ago
@Madiator2011 (Work) so first thing I noticed was that comfyUi was not deployed. Second thing is that the python main.py --listen doesn not work Traceback (most recent call last): File "/workspace/ComfyUI/main.py", line 73, in <module> import comfy.utils File "/workspace/ComfyUI/comfy/utils.py", line 1, in <module> import torch File "/workspace/venv/lib/python3.10/site-packages/torch/init.py", line 238, in <module> _load_global_deps() File "/workspace/venv/lib/python3.10/site-packages/torch/init.py", line 197, in _load_global_deps raise err File "/workspace/venv/lib/python3.10/site-packages/torch/init.py", line 178, in _load_global_deps ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL) File "/usr/lib/python3.10/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: /workspace/venv/lib/python3.10/site-packages/torch/lib/libtorch_global_deps.so: cannot open shared object file: No such file or directory I am going to try wiping out ComfyUI and starting over since the only thing this installation has is ComfyUi manager
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
ye you would need reinstall custom nodes so it preinstall required packages
nerdylive
nerdylive•5mo ago
If you use comfyui manager, install the pip dependencies like you first install comfyui manager then fix all package from the cm-cli of comfyui manager
flick401
flick401OP•5mo ago
@nerdylive I am running1 x RTX A4000 6 vCPU 23 GB RAM Is it possible that I get an error torch.cuda.OutOfMemoryError if I am doing something like this?
No description
nerdylive
nerdylive•5mo ago
I don't know never used that node Use the 24gb gpu vram at least
flick401
flick401OP•5mo ago
is it possbile to switch gpu? without having to setup everything again?
nerdylive
nerdylive•5mo ago
Sure it's easy enough if you have data saved in a network storage (just use the same in another pod) Or if you have it in a pod with no ns, you need to reinstall all of the files/program again
flick401
flick401OP•5mo ago
I have secure cloud network storage
nerdylive
nerdylive•5mo ago
Use the same template on another pod I guess Yeah with the same network storage
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
if you used my template all thing should be saved on NS
flick401
flick401OP•5mo ago
I am going to shut down the current machine and use another gpu. let's give it a try
nerdylive
nerdylive•5mo ago
Okay
flick401
flick401OP•5mo ago
terminating pod now
nerdylive
nerdylive•5mo ago
Chill, it's fine don't need to update everything here 👌
flick401
flick401OP•5mo ago
sorry, it's just my 7th time having to setup everything all over again and wnted to just make sure I did things right. Terminating and stopping are two different things but there was no other option. Just nervous I will have to redo everything again. btw @Madiator2011 (Work) There are 20 GB it needs to download everytime you terminate the pod and run it again. Any guess as to what it is downloading?
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
Its base image + build in models
nerdylive
nerdylive•5mo ago
All good, if youre not sure better to stop it first if you have the option to(you don't when you use ns)
flick401
flick401OP•5mo ago
Ok, that seems to have done it. But I did notice that it was more CPU intensive than GPU. Is that because somewhere I am not configuring comfy to use GPU for processing?
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
nope usually yo do not need do anything to run on gpu
nerdylive
nerdylive•5mo ago
maybe use gpu sampler for more speeds but it changes abit on the image generation process... ( im not really sure how to explain but you can experiment )
flick401
flick401OP•5mo ago
@Madiator2011 (Work) you may need to adjust your script to not create a venv in the root. and instead use the python instance in the /workspace
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
@flick401 whats the context
nerdylive
nerdylive•5mo ago
venv in / ?
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
though on what template we talk about
flick401
flick401OP•5mo ago
bettry comfy ui
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
This is correct behaviour
flick401
flick401OP•5mo ago
when I do any kind of pip install -r requirements.txt it begins installing everything in the /venv/lib/python3.1.0/site-packages
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
as on secure cloud /workspace is being overwritten did you activated venv first?
flick401
flick401OP•5mo ago
even if I activate the script first it still uses the /venv
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
what kinda script you try to run
flick401
flick401OP•5mo ago
Requirement already satisfied: huggingface-hub in /venv/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (0.23.4)
nerdylive
nerdylive•5mo ago
hmm yeah aren't you should be using the /venv, thats the point of getting faster speeds on runtime
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
/venv is only cause it need to sync it to /workspace on secure cloud
Marcus
Marcus•5mo ago
Problem with /venv is that custom nodes get lost if pod is restarted
nerdylive
nerdylive•5mo ago
yea, so when does your template syncs back to the more persistent storage ?
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
it's not as comfy ui uses venv from /workspace
nerdylive
nerdylive•5mo ago
ohh wait so whats the dependencies on / for? oh for code server
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
it's so I can install required packages for comfy ui to start then sync it to /workspace on boot code server is not using venv
nerdylive
nerdylive•5mo ago
Hm.. so no more download?
flick401
flick401OP•5mo ago
so pretty much we have 2 instances of python and it confuses the custom_nodes cause half of the dependencies have been installed in one and half on the other is there a way to specify which python to use
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
nah all custom nodes are installed on /workspace if you use node manager
flick401
flick401OP•5mo ago
you can't use the comfy ui manager This action is not allowed with this security level configuration.
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
what it worked for many users do you install some wierd extension
flick401
flick401OP•5mo ago
No description
flick401
flick401OP•5mo ago
this is marked as experimental
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
does not tell me anything
flick401
flick401OP•5mo ago
No I didn't install weird extensions These are all taken from the latest release
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
I mean I installed many extensions and all worked so im confused right now
flick401
flick401OP•5mo ago
you should be able to just ssh into the terminal and use pip to install python packages
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
though you need to install to venv as comfy ui runs from venv
flick401
flick401OP•5mo ago
ok, so we are saying /venv is the lib to use
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
./workspace/venv/bin/python -m pip install -r requirements.txt could be comfy ui have hardcoded /venv
flick401
flick401OP•5mo ago
I think that may have worked
Marcus
Marcus•5mo ago
venv hard-code themselves, if you move it somewhere else, you have to update it in the files in bin folder
Madiator2011 (Work)
Madiator2011 (Work)•5mo ago
I mean ComfUI has hardcoded /venv/
Marcus
Marcus•5mo ago
It does not Why would it do that anyway? Some users are on Windows, Mac etc not all Linux And even for Linux, most users would not run it as root user
flick401
flick401OP•4mo ago
@Madiator2011 (Work) does this image Better ComfyUI CUDA12 Full now copy the venv and ComfyUi you have in your workspace and deploy it?
Madiator2011 (Work)
Madiator2011 (Work)•4mo ago
yes venv is synced to /workspace
flick401
flick401OP•4mo ago
very nice. That should save me time by loading everything I had in workspace I do notice though that even with 1 x RTX A5000 8 vCPU 29 GB RAM It is terribly slow using CUDA
Madiator2011 (Work)
Madiator2011 (Work)•4mo ago
not first sync might be slow on first boot if use network storage
Want results from more Discord servers?
Add your server