MountaintopLotus / braintrust

A Dockerized platform for running Stable Diffusion, on AWS (for now)
Apache License 2.0
1 stars 2 forks source link

Start page #82

Open JohnTigue opened 1 year ago

JohnTigue commented 1 year ago

There are three four webIUIs that can be installed on Open Stables – some have odd port numbers. Might as well put an web server on port 80 that links to them all.

The list should have the four icons for the four webUIs (if there are four icons). Perhaps a Stable Diffusion logo in the center and 4 webUIs around it? But also want a linear list of icons for small screens.

JohnTigue commented 1 year ago

Subtle complexity here is a more sophisticated start-up routine/script. Was doing something similar in EC2, but want it inside the container/app on the Docker level.

JohnTigue commented 1 year ago

Here's the CLI config for controlling what port InvokeAI will be made available on:

https://github.com/ManyHands/stable-diffusion-webui-docker/blob/master/services/invoke/Dockerfile#L70

JohnTigue commented 1 year ago

Same info from the docs:

--port … Which port web server should listen for requests on.

Default is 9090. Start page is at 80, so no reason not to use 9090 as some might be used to that (meh, why not).

JohnTigue commented 1 year ago

Starting to wonder what benefit is there over one Docker container with multiple web servers on different ports, versus one VM with multiple containers running on it, each container have only one web server. So far I've been aiming at the former but the latter would be more flexible and easy to maintain.

JohnTigue commented 1 year ago

Clearly the long term, mature architecture calls out for two clusters: a web fronting cluster, and a separate render cluster with no interface except a message queue. I don't want to nor do I feel it necessary to do that at this time (and I have no idea how much hacking on InvokeAIs code would be required to pull that off).

But, I like the idea of have two types of containers running in ONE cluster. With this start page getting in the mix, now seems like the time to do that. It will not really have massive pay out now, but it will be laying the foundations for a well structured future, so why not push that snowball down the correct valley slope now?

JohnTigue commented 1 year ago

I guess a nice feature to put on the start page is at least a link to a Stable Diffusion Image Browser (#20).

And fancier would be an actual image grid. That would be an excite eye full. It's kinda dry as is. But that's a bell and whistle not a core MVP feature.

JohnTigue commented 1 year ago

Maybe a Lambda that gets tickled by a load of the start page isn't such a bad idea. Sure, it's more hackery but it could be used to kick the ECS cluster to scale from zero to one (if GPU instance count is at zero). A wee message could say "Please wait, spinning up an instance."

Dunno, worth exploring after min-instances-is-one stuff is performing well while being used by folks.

JohnTigue commented 1 year ago

Simply hosting static content is odd here. My default solution these days is S3 static objects distributed via CloudFront because it is cheap, simple, super scalable, and gets to users globally at top speed. And I would normally connect that to Lambdas and do the whole serverless routine. But things with Docker and ECS are different. What connects them as a logical whole? There's not SAM or such. I guess somehow it could be done with CloudFormations. It just seems silly and wasteful to throw in something like nginx to host static files but that would get the web fronter to be in with the rest of the Dockerized app…

Is there some way of doing this with ECS I don't know about yet?

JohnTigue commented 1 year ago

Yup, there sure is :) AWS copilot is sweet!

AWS Copilot v1.21: CloudFront is here! Posted On: Aug 17, 2022:

Copilot v1.21 brings several new features and improvements: Integrate CloudFront with Application Load Balancer: You can now deploy CloudFront in front of your Load Balanced Web Services!

JohnTigue commented 1 year ago

Ya know, some of that alea code from last fall would mean hypnowerk would have a SSO bouncer at the front door…

JohnTigue commented 1 year ago

I bet one of the things retarding the diffusion of my work throughout the corp is all these ugly URLs for the SD services. For example, the current A1111 is at: http://54.202.60.7:7860/

So candidates fro more friendly URLs:

JohnTigue commented 1 year ago

The start page will evolve to a user's dashboard. Here they will be able to choose which apps to start, and to stop, as well as configure idle timeouts after which the EC2 instance running the app will be stopped.