MountaintopLotus / braintrust

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

Deploy InvokeAI to AWS #59

Closed JohnTigue closed 1 year ago

JohnTigue commented 1 year ago

We are going to want Invoke running on AWS.

JohnTigue commented 1 year ago

Here's a nice packaging of SD for deploy via Docker, which includes A1111, InvokeAI, and something called Sygil, Stable Diffusion WebUI Docker. This might be a very easy way to spin up machines, both A1111 and Invoke.

JohnTigue commented 1 year ago

Someone mentioned:

If you use the stack I mentioned above with the Github link, Docker will complain that it doesn't understand the --profile syntax in the start-up commands. The only solution I've ever found is uninstalling Docker and reinstalling with the Docker installation script.

Yup.

ubuntu@ip-172-31-1-3:~$ docker compose --profile download up --build
unknown flag: --profile
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND
JohnTigue commented 1 year ago

Trying the uninstall and reinstall rigmarole and the Docker engine is not starting now…

JohnTigue commented 1 year ago

Re-rigmaroled and worked. Seems I was going faster than the computer liked?

$ systemctl status docker.service
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2023-01-16 17:53:42 UTC; 15min ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 27201 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
   Main PID: 27201 (code=exited, status=1/FAILURE)
JohnTigue commented 1 year ago

OK, so trying to get past two commands:

docker compose --profile download up --build
# wait until its done, then:
docker compose --profile [ui] up --build
# where [ui] is one of: invoke | auto | auto-cpu | sygil | sygil-sl

First is a go, but ran out of file system space on second.

JohnTigue commented 1 year ago
$ df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/root      ext4       44G   40G  3.6G  92% /
JohnTigue commented 1 year ago

This isn't going to be trivial:

$ sudo xfs_growfs -d /
xfs_growfs: / is not a mounted XFS filesystem
JohnTigue commented 1 year ago

How do I expand the Amazon EBS root volume of my Amazon EC2 Linux instance?:

Expand the EBS root volume of EC2 Linux running on a current generation instance without detaching and reattaching the volume by using the Amazon EBS Elastic Volumes feature.

JohnTigue commented 1 year ago

Here's the original EBS:

vol-079b1ed97c7d1e8e0 /dev/sda1 45GB

JohnTigue commented 1 year ago

Increased to 70GB. Screen Shot 2023-01-16 at 10 39 19 AM

JohnTigue commented 1 year ago

Wow, bad docs by AWS, again. But got around it, FS 40GB => 70GB.

JohnTigue commented 1 year ago

Now it's looking like drivers are missing? Even though I'm using a Deep Learning image?

[+] Running 1/1
 ⠿ Container webui-docker-invoke-1  Created                                                                                                0.1s
Attaching to webui-docker-invoke-1
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: nvml error: driver not loaded: unknown
JohnTigue commented 1 year ago

Let's try a BIGGER machine. Screen Shot 2023-01-16 at 11 35 19 AM

JohnTigue commented 1 year ago

Live on http://52.42.196.43:7860/, although that's just temporary. It's a single smallish (in SD terms) instance on EC2. It is Dockerized. So next test is #58.