Skip to content

Commit

Permalink
modify create url of tenical solution
Browse files Browse the repository at this point in the history
  • Loading branch information
xiao201208 committed Dec 26, 2023
1 parent b136ca9 commit e998503
Show file tree
Hide file tree
Showing 4 changed files with 495 additions and 416 deletions.
110 changes: 58 additions & 52 deletions documents/solution/ai/pai-ai-painting-solution.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: The one-click deployment template of the PAI AI painting solution will deploy
cloud resources such as VPC, VSwitch, security group, Nat gateway, EIP, PAI-EAS,
and NAS.
zh-cn: 该PAI AI绘画解决方案一键部署模板将会部署VPC、VSwitch、安全组、Nat网关、EIP、PAI-EAS、NAS等云资源。请在新加坡地域使用该模板
en: >-
The one-click deployment template of the PAI AI painting solution will
deploy cloud resources such as VPC, VSwitch, security group, Nat gateway,
EIP, PAI-EAS, and NAS.
zh-cn: >-
该PAI
AI绘画解决方案一键部署模板将会部署VPC、VSwitch、安全组、Nat网关、EIP、PAI-EAS、NAS等云资源。请在新加坡地域使用该模板
Parameters:
ZoneId:
Type: String
Expand All @@ -26,12 +29,12 @@ Parameters:
Default: ml.gu7i.c16m60.1-gu30
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Type: 'ALIYUN::ECS::VPC'
Properties:
VpcName: vpc_SDWebUI
CidrBlock: 192.168.0.0/16
VSwitch:
Type: ALIYUN::ECS::VSwitch
Type: 'ALIYUN::ECS::VSwitch'
Properties:
ZoneId:
Ref: ZoneId
Expand All @@ -40,7 +43,7 @@ Resources:
VSwitchName: vswitch_SDWebUI
CidrBlock: 192.168.0.0/18
NatGateway:
Type: ALIYUN::VPC::NatGateway
Type: 'ALIYUN::VPC::NatGateway'
Properties:
VpcId:
Ref: Vpc
Expand All @@ -51,39 +54,39 @@ Resources:
InternetChargeType: PayByLcu
NetworkType: internet
Tags:
- Key: WebUI
Value: SD_WebUI
- Key: WebUI
Value: SD_WebUI
Eip:
Type: ALIYUN::VPC::EIP
Type: 'ALIYUN::VPC::EIP'
Properties:
Name: eip_SDWebUI
Bandwidth: 200
InternetChargeType: PayByTraffic
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Type: 'ALIYUN::ECS::SecurityGroup'
Properties:
VpcId:
Ref: Vpc
SecurityGroupName: sg_SDWebUI
SecurityGroupType: normal
SecurityGroupIngress:
- Priority: 1
PortRange: 22/22
NicType: internet
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
- Priority: 1
PortRange: 80/80
NicType: internet
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
- Priority: 1
PortRange: 443/443
NicType: internet
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
- Priority: 1
PortRange: 22/22
NicType: internet
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
- Priority: 1
PortRange: 80/80
NicType: internet
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
- Priority: 1
PortRange: 443/443
NicType: internet
SourceCidrIp: 0.0.0.0/0
IpProtocol: tcp
Nas:
Type: ALIYUN::NAS::FileSystem
Type: 'ALIYUN::NAS::FileSystem'
Properties:
ZoneId:
Ref: ZoneId
Expand All @@ -92,13 +95,13 @@ Resources:
ProtocolType: NFS
EncryptType: 0
NasAccessGroup:
Type: ALIYUN::NAS::AccessGroup
Type: 'ALIYUN::NAS::AccessGroup'
Properties:
AccessGroupType: Vpc
AccessGroupName: nas_accessgroup_SDWebUI
FileSystemType: standard
NasAccessRule:
Type: ALIYUN::NAS::AccessRule
Type: 'ALIYUN::NAS::AccessRule'
Properties:
Priority: 100
UserAccessType: no_squash
Expand All @@ -108,7 +111,7 @@ Resources:
RWAccessType: RDWR
FileSystemType: standard
NasMountTarget:
Type: ALIYUN::NAS::MountTarget
Type: 'ALIYUN::NAS::MountTarget'
Properties:
VpcId:
Ref: Vpc
Expand All @@ -123,9 +126,9 @@ Resources:
AccessGroupName:
Ref: NasAccessGroup
DependsOn:
- NasAccessRule
- NasAccessRule
RandomString:
Type: ALIYUN::RandomString
Type: 'ALIYUN::RandomString'
Properties:
length: 10
character_classes:
Expand All @@ -134,12 +137,12 @@ Resources:
- class: digits
min: 1
Pai-Eas:
Type: ALIYUN::PAI::Service
Type: 'ALIYUN::PAI::Service'
Properties:
ServiceConfig:
metadata:
name:
Fn::Sub: sdwebui_${RandomString.value}
'Fn::Sub': 'sdwebui_${RandomString.value}'
instance: 1
type: SDCluster
enable_webservice: true
Expand All @@ -156,30 +159,33 @@ Resources:
security_group_id:
Ref: SecurityGroup
storage:
- nfs:
path: /
server:
Fn::GetAtt:
- NasMountTarget
- MountTargetDomain
properties:
resource_type: model
mount_path: /code/stable-diffusion-webui/data-nas
- nfs:
path: /
server:
'Fn::GetAtt':
- NasMountTarget
- MountTargetDomain
properties:
resource_type: model
mount_path: /code/stable-diffusion-webui/data-nas
containers:
- image: eas-registry-vpc.ap-southeast-1.cr.aliyuncs.com/pai-eas/stable-diffusion-webui:4.1
script: ./webui.sh --listen --port 8000 --skip-version-check --no-hashing
--no-download-sd-model --skip-install --api --filebrowser --cluster-status
--sd-dynamic-cache --data-dir /code/stable-diffusion-webui/data-nas
port: 8000
- image: >-
eas-registry-vpc.ap-southeast-1.cr.aliyuncs.com/pai-eas/stable-diffusion-webui:4.1
script: >-
./webui.sh --listen --port 8000 --skip-version-check --no-hashing
--no-download-sd-model --skip-install --api --filebrowser
--cluster-status --sd-dynamic-cache --data-dir
/code/stable-diffusion-webui/data-nas
port: 8000
meta:
type: SDCluster
options:
enableCache: ture
Metadata:
ALIYUN::ROS::Interface:
'ALIYUN::ROS::Interface':
ParameterGroups:
- Parameters:
- ZoneId
- InstanceType
- Parameters:
- ZoneId
- InstanceType
TemplateTags:
- acs:technical-solution:ai:PAI部署多形态的Stable Diffusion WebUI服务-tech_solu_91
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Parameters:
Description:
zh-cn: 如果您需要配置二级域名为您的OSS源站加速时,必须填写二级域名前缀,例如static。否则,请保持配置为空即可。
en: >-
If you want to configure a second-level domain name to accelerate
your OSS origin server, you must specify the second-level domain
name prefix, for example, static. Otherwise, leave the configuration empty.
If you want to configure a second-level domain name to accelerate your
OSS origin server, you must specify the second-level domain name
prefix, for example, static. Otherwise, leave the configuration empty.
Label:
zh-cn: 域名前缀
en: Sub Domain Name Prefix
Expand Down Expand Up @@ -45,8 +45,10 @@ Parameters:
href='https://help.aliyun.com/zh/icp-filing/getting-started/to-prepare-the-icp-record-domain-name-1?spm=a2c4g.2357270.0.i7'
target='_blank'><font color='blue'>ICP备案域名</font></a></b>
en: >-
Fill in the first-level domain name you purchased, such as example.com. If the bucket you want to bind to is in the Chinese
mainland, the top-level domain name that you set must go through ICP filing, otherwise the creation and use of your resources will be affected. See: <b><a
Fill in the first-level domain name you purchased, such as example.com.
If the bucket you want to bind to is in the Chinese mainland, the
top-level domain name that you set must go through ICP filing, otherwise
the creation and use of your resources will be affected. See: <b><a
href='https://help.aliyun.com/zh/icp-filing/getting-started/to-prepare-the-icp-record-domain-name-1?spm=a2c4g.2357270.0.i7'
target='_blank'><font color='blue'>ICP Filing Domain Name</font></a></b>
Label:
Expand Down Expand Up @@ -97,8 +99,10 @@ Resources:
- Ref: DomainName
- 'Fn::Sub': '${SubDomainNamePrefix}.${DomainName}'
Sources:
Fn::Sub:
- '[{"content":"${content}", "type":"oss", "priority":"20", "port":80, "weight":"100"}]'
'Fn::Sub':
- >-
[{"content":"${content}", "type":"oss", "priority":"20", "port":80,
"weight":"100"}]
- content:
'Fn::GetAtt':
- Bucket
Expand Down
Loading

0 comments on commit e998503

Please sign in to comment.