-
Notifications
You must be signed in to change notification settings - Fork 35
/
aiacc.yml
228 lines (228 loc) · 6.78 KB
/
aiacc.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: Quickly implement AIGC painting based on the AIACC accelerator.
zh-cn: 基于AIACC加速器快速实现AIGC绘画。
Mappings:
Images:
v2.3.0:
cn-beijing: m-2ze2355f061213z7wkmd
cn-chengdu: m-2vc8gw95jt1a3pnekhaf
cn-guangzhou: m-7xv5jmgay1umv241fuhl
cn-hangzhou: m-bp1e796nsjeuruq879fs
cn-heyuan: m-f8zbcsng6b538is8kncl
cn-huhehaote: m-hp3dor1c0g6m42vkaqmc
cn-qingdao: m-m5eey29yp3ohwkcl08ig
cn-shanghai: m-uf69rd86195a1kq6tcca
cn-shenzhen: m-wz97ya51lhoajugj52fs
cn-wulanchabu: m-0jlay21qst1a1u7twuwp
cn-zhangjiakou: m-8vb16qkofm9zvs2ifq34
Parameters:
EcsInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例类型
Description:
en: This solution requires GPU computing type gn7i series servers. If there
are no instance specifications that meet the conditions, please change the
region.
zh-cn: 此方案需要 GPU 计算型 gn7i 系列服务器,如果没有满足条件的实例规格,请更换地域。
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
SpotStrategy: SpotAsPriceGo
AllowedValues:
- ecs.gn7i-c16g1.4xlarge
- ecs.gn7i-c32g1.8xlarge
- ecs.gn7i-c48g1.12xlarge
ZoneId:
Type: String
Label:
en: VSwitch Availability Zone
zh-cn: 交换机可用区
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
InstancePassword:
Type: String
Label:
en: Instance Password
zh-cn: 实例密码
Description:
en: Server login password, Length 8-30, must contain three(Capital letters,
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol
in)
zh-cn: 服务器登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)
ConstraintDescription:
en: Length 8-30, must contain three(Capital letters, lowercase letters, numbers,
()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in)
zh-cn: 长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)
AssociationProperty: ALIYUN::ECS::Instance::Password
AllowedPattern: ^[a-zA-Z0-9-\(\)\`\~\!\@\#\$\%\^\&\*\_\-\+\=\|\{\}\[\]\:\;\<\>\,\.\?\/]*$
MinLength: 8
MaxLength: 30
NoEcho: true
UserName:
Type: String
Label:
en: User Name
zh-cn: 软件登录名
Default: admin
Password:
Type: String
Label:
en: Software Login Password
zh-cn: 软件登录密码
Description:
en: Software login password, Length 8-30, must contain three(Capital letters,
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol
in)
zh-cn: 软件登录密码
ConstraintDescription:
en: Length 8-30, must contain three(Capital letters, lowercase letters, numbers,
()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in)
zh-cn: 长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊符号)
AssociationProperty: ALIYUN::ECS::Instance::Password
AllowedPattern: ^[a-zA-Z0-9-\(\)\`\~\!\@\#\$\%\^\&\*\_\-\+\=\|\{\}\[\]\:\;\<\>\,\.\?\/]*$
MinLength: 8
MaxLength: 30
NoEcho: true
Resources:
EcsVpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock: 192.168.0.0/16
VpcName:
Ref: ALIYUN::StackName
EcsSecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: EcsVpc
SecurityGroupName:
Ref: ALIYUN::StackName
SecurityGroupIngress:
- PortRange: 5000/5000
Priority: 1
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
NicType: internet
- PortRange: 22/22
Priority: 1
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
NicType: internet
SecurityGroupEgress:
- PortRange: '-1/-1'
Priority: 1
IpProtocol: all
DestCidrIp: 0.0.0.0/0
NicType: internet
- PortRange: '-1/-1'
Priority: 1
IpProtocol: all
DestCidrIp: 0.0.0.0/0
NicType: intranet
EcsVSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: EcsVpc
CidrBlock: 192.168.0.0/24
VSwitchName:
Ref: ALIYUN::StackName
EcsInstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId:
Fn::FindInMap:
- Images
- v2.3.0
- Ref: ALIYUN::Region
IoOptimized: optimized
SystemDiskSize: 500
MaxAmount: 1
SystemDiskCategory: cloud_essd
InternetMaxBandwidthOut: 100
InstanceType:
Ref: EcsInstanceType
AllocatePublicIP: true
SpotStrategy: SpotAsPriceGo
Password:
Ref: InstancePassword
InstanceRunCommand:
Type: ALIYUN::ECS::RunCommand
Properties:
InstanceIds:
Fn::GetAtt:
- EcsInstanceGroup
- InstanceIds
CommandContent:
Fn::Sub: |-
#!/bin/bash
htpasswd -bc /etc/nginx/password ${UserName} ${Password}
systemctl restart nginx
systemctl enable nginx
cd stable-diffusion-webui/
sed -i 's|python|/workspace/miniconda/bin/python|g' run_taiyi.sh
nohup ./run_taiyi.sh > output.log 2>&1 &
Type: RunShellScript
Timeout: '300'
Sync: true
Outputs:
Endpoint:
Description:
en: The Addresses of WebUI.
zh-cn: WebUI地址。
Value:
Fn::Sub:
- http://${ServerAddress}:5000
- ServerAddress:
Fn::Select:
- 0
- Fn::GetAtt:
- EcsInstanceGroup
- PublicIps
EcsLoginAddress:
Description:
en: Ecs login address.
zh-cn: ECS登录地址。
Value:
Fn::Sub:
- https://ecs-workbench.aliyun.com/?from=EcsConsole&instanceType=ecs®ionId=${Region}&instanceId=${InstanceId}
- InstanceId:
Fn::Select:
- 0
- Fn::GetAtt:
- EcsInstanceGroup
- InstanceIds
Region:
Ref: ALIYUN::Region
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- ImageId
- EcsInstanceType
- ZoneId
- InstancePassword
Label:
default:
en: Instance
zh-cn: ECS实例配置
- Parameters:
- UserName
- Password
Label:
default:
en: Login Information
zh-cn: 登录信息
TemplateTags:
- acs:document-help:ecs:基于AIACC加速器快速实现AIGC绘画