forked from AUTOMATIC1111/stable-diffusion-webui
-
Notifications
You must be signed in to change notification settings - Fork 41
/
sd-web-ui-cf-template.yaml
46 lines (45 loc) · 1.31 KB
/
sd-web-ui-cf-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
AWSTemplateFormatVersion: '2010-09-09'
Description: A CloudFormation template to deploy the Stable Diffusion Web UI by Automatic1111
Resources:
SecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: sd-webui-sg
GroupDescription: Security group for SD WebUI EC2 instance
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 7860
ToPort: 7860
CidrIp: 0.0.0.0/0
EC2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: g4dn.xlarge
ImageId: ami-0574da719dca65348
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 300
VolumeType: gp2
"Tags" : [
{"Key" : "Name", "Value" : "sd-web-ui-cf"},
]
SecurityGroups:
- Ref: SecurityGroup
UserData:
'Fn::Base64': |
#!/bin/bash
cd /home/ubuntu
git clone https://github.com/marshmellow77/stable-diffusion-webui.git
bash stable-diffusion-webui/setup.sh -y
MyEIP:
Type: AWS::EC2::EIP
MyEIPAssociation:
Type: AWS::EC2::EIPAssociation
Properties:
AllocationId: !GetAtt MyEIP.AllocationId
InstanceId: !Ref EC2Instance