forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
aigc-text-generation-3d-model-with-ecs.yml
236 lines (236 loc) · 7.02 KB
/
aigc-text-generation-3d-model-with-ecs.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
229
230
231
232
233
234
235
236
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: AIGC Text Generation 3D Model.
zh-cn: AIGC文本生成3D模型。
Mappings:
Images:
v2.3.0:
cn-zhangjiakou: m-8vb16qkofm9zvs2ifq34
cn-shenzhen: m-wz97ya51lhoajugj52fs
cn-qingdao: m-m5eey29yp3ohwkcl08ig
cn-heyuan: m-f8zbcsng6b538is8kncl
cn-guangzhou: m-7xv5jmgay1umv241fuhl
cn-beijing: m-2ze2355f061213z7wkmd
cn-wulanchabu: m-0jlay21qst1a1u7twuwp
cn-shanghai: m-uf69rd86195a1kq6tcca
cn-huhehaote: m-hp3dor1c0g6m42vkaqmc
cn-hangzhou: m-bp1e796nsjeuruq879fs
cn-chengdu: m-2vc8gw95jt1a3pnekhaf
Parameters:
ZoneId:
Type: String
AssociationProperty: 'ALIYUN::ECS::Instance::ZoneId'
Label:
en: VSwitch Availability Zone
zh-cn: 交换机可用区
EcsInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 实例类型
AssociationProperty: 'ALIYUN::ECS::Instance::InstanceType'
AssociationPropertyMetadata:
SpotStrategy: SpotAsPriceGo
AllowedValues:
- ecs.gn7i-c16g1.4xlarge
- ecs.gn7i-c32g1.8xlarge
- ecs.gn7i-c48g1.12xlarge
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 系列服务器,如果没有满足条件的实例规格,请更换地域。
InstancePassword:
NoEcho: true
Type: String
Description:
en: >-
Server login password, Length 8-30, must contain three(Capital letters,
lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special
symbol in)
zh-cn: >-
服务器登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
中的特殊符号)
AllowedPattern: '^[a-zA-Z0-9-\(\)\`\~\!\@\#\$\%\^\&\*\_\-\+\=\|\{\}\[\]\:\;\<\>\,\.\?\/]*$'
Label:
en: Instance Password
zh-cn: 实例密码
ConstraintDescription:
en: >-
Length 8-30, must contain three(Capital letters, lowercase letters,
numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in)
zh-cn: '长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/ 中的特殊符号)'
MinLength: 8
MaxLength: 30
AssociationProperty: 'ALIYUN::ECS::Instance::Password'
UserName:
Type: String
Label:
en: User Name
zh-cn: 软件登录名
Default: admin
Password:
NoEcho: true
Type: String
Description:
en: >-
Software login password, Length 8-30, must contain three(Capital
letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/
Special symbol in)
zh-cn: 软件登录密码
AllowedPattern: '^[a-zA-Z0-9-\(\)\`\~\!\@\#\$\%\^\&\*\_\-\+\=\|\{\}\[\]\:\;\<\>\,\.\?\/]*$'
Label:
en: Software Login Password
zh-cn: 软件登录密码
ConstraintDescription:
en: >-
Length 8-30, must contain three(Capital letters, lowercase letters,
numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in)
zh-cn: '长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/ 中的特殊符号)'
MinLength: 8
MaxLength: 30
AssociationProperty: 'ALIYUN::ECS::Instance::Password'
Resources:
EcsVpc:
Type: 'ALIYUN::ECS::VPC'
Properties:
VpcName:
Ref: 'ALIYUN::StackName'
CidrBlock: 192.168.0.0/16
EcsVSwitch:
Type: 'ALIYUN::ECS::VSwitch'
Properties:
VSwitchName:
Ref: 'ALIYUN::StackName'
VpcId:
Ref: EcsVpc
ZoneId:
Ref: ZoneId
CidrBlock: 192.168.0.0/24
EcsSecurityGroup:
Type: 'ALIYUN::ECS::SecurityGroup'
Properties:
SecurityGroupName:
Ref: 'ALIYUN::StackName'
VpcId:
Ref: EcsVpc
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
EcsInstanceGroup:
Type: 'ALIYUN::ECS::InstanceGroup'
Properties:
IoOptimized: optimized
VpcId:
Ref: EcsVpc
VSwitchId:
Ref: EcsVSwitch
ZoneId:
Ref: ZoneId
SecurityGroupId:
Ref: EcsSecurityGroup
SystemDiskCategory: cloud_essd
SystemDiskSize: 500
MaxAmount: 1
ImageId:
'Fn::FindInMap':
- Images
- v2.3.0
- Ref: 'ALIYUN::Region'
InstanceType:
Ref: EcsInstanceType
Password:
Ref: InstancePassword
AllocatePublicIP: true
InternetMaxBandwidthOut: 100
SpotStrategy: SpotAsPriceGo
InstanceRunCommand:
Type: 'ALIYUN::ECS::RunCommand'
Properties:
Sync: true
Type: RunShellScript
InstanceIds:
'Fn::GetAtt':
- EcsInstanceGroup
- InstanceIds
Timeout: '300'
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 &
Outputs:
EcsLoginAddress:
Description:
zh-cn: ECS登录地址。
en: Ecs login address.
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'
Endpoint:
Description:
zh-cn: WebUI地址。
en: The Addresses of WebUI.
Value:
'Fn::Sub':
- 'http://${ServerAddress}:5000'
- ServerAddress:
'Fn::Select':
- 0
- 'Fn::GetAtt':
- EcsInstanceGroup
- PublicIps
Metadata:
'ALIYUN::ROS::Interface':
TemplateTags:
- 'acs:technical-solution:ai:文本生成3D模型-tech_solu_02'
ParameterGroups:
- Parameters:
- ImageId
- EcsInstanceType
- ZoneId
- InstancePassword
Label:
default:
en: Instance
zh-cn: ECS实例配置
- Parameters:
- UserName
- Password
Label:
default:
en: Login Information
zh-cn: 登录信息