Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programatically installing plugins while creating a container image #514

Open
sovereignstack opened this issue Mar 24, 2024 · 6 comments
Open

Comments

@sovereignstack
Copy link

I want to create a Comfy UI container image with a bunch of plugins preinstalled. I want to do this programmatically using just a Dockerfile or maybe Dockerfile + a script which executes at container build time and not container run time. The objective is to have a production ready container image that has all the required plugins preinstalled. This will save bandwidth, startup time, improve security as I can block internet access to the pod etc. This will be used in a Kubernetes cluster. So it's not one container instance that you manually configure, tweak and use for months on end.

I do not wish to build the container by "hand" which is - starting with a basic comfy UI container then installing the required plugins via UI and then saving the container state into an image. The approach has to be automation friendly for sake of reproducibility and repeatability. As a continuation to this, it would be nice to somehow specify and enlist version numbers (or commit id) of various plugins so that the builds are reproducible. At this point ComfyUI-Manger starts looking more like a conventional package manager.

Is there a way to achieve automated builds today with the required extensions baked in?

@ltdrdata
Copy link
Owner

ltdrdata commented Apr 1, 2024

It might be a good idea to look into the snapshot feature.

https://github.com/ltdrdata/ComfyUI-Manager#snapshot-manager

@sovereignstack
Copy link
Author

Thanks, this feature looks like its working without comfy UI Manager. Is Comfy UI manager able to detect plugins that are installed without using Comfy UI Manager say through a snapshot restore or through the terminal?

@ltdrdata
Copy link
Owner

ltdrdata commented Apr 1, 2024

Thanks, this feature looks like its working without comfy UI Manager. Is Comfy UI manager able to detect plugins that are installed without using Comfy UI Manager say through a snapshot restore or through the terminal?

The list of installed custom nodes can be found by looking at the ComfyUI/custom_nodes directory.

@LucasMoskun
Copy link

Hello,

I am also trying to do this.

The snapshot manager looks very useful for nodes, but how about automating the installation of models and loras?

I see in terms of models I see where you are calling the comfyUI API to do this here.

Is there a way to call comfyUI manager functions as an API. Any other suggestions you may have?

Thank you

@ltdrdata
Copy link
Owner

ltdrdata commented Apr 15, 2024

Various improvement projects are currently underway.

FYI, It's still in the early stages, but this will be your solution.
https://github.com/Comfy-Org/comfy-cli

@LucasMoskun
Copy link

Various improvement projects are currently underway.

FYI, It's still in the early stages, but this will be your solution. https://github.com/Comfy-Org/comfy-cli

Ooooh nice :-) -- is there anything I can do to help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants