- Automatically install sd-webui on AWS EC2 instance
- Expose webui endpoint("AlbDnsName" in cloudformation's Outputs) through ALB
- You need to change ssh key-pars with your own before run below instructions
- Default credential of webui is admin/123456, you can change those here
- Default instance type is g5.2xlarge
- Make sure you follow the AWS CDK Prerequisites before you build the project.
- Clone this project and change the directory to the root folder of the project, and run below commands:
$ npm install -g aws-cdk
$ npm install
$ cdk bootstrap
- Run commands as below:
$ cdk synth
$ cdk deploy
- Remove ec2 role's policy first, then run:
$ cdk destroy
- SD-Webui repo is under /home/ubuntu directory
- Default command in CDK scripts for running SD-Webui is "nohup bash webui.sh --xformers --listen --gradio-auth admin:123456 > ./sd-webui.log 2>&1 &", you can kill that process and run your own command with different flags
- You can use "tail -f /home/ubuntu/sd-webui.log" to get real time logs for webui
- After CDK deployment is finished, SD-Webui instance still needs some time to be initiated at ALB backend. Please check "Status" of ec2 target in ALB target group. The "healthy" indicates that everything is ready to use
- Regarding how to use SD-Webui, read its official repo