Skip to content

Commit

Permalink
add refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
suluyana committed Dec 16, 2024
1 parent c76f357 commit b9cf261
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 8 additions & 3 deletions publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,17 @@ Parameters:
default: ''
description: nas所在的专用网络id,nasMountAddr为空时不会被取用。
securityGroupId:
title:
title: vpc安全组id
type: string
default: ''
description: nas所在专用网络的安全组id,nasMountAddr为空时不会被取用。
vSwitchIds:
title:
title: vpc交换机id
type: string
default: ''
description: nas所在专用网络的交换机id,nasMountAddr为空时不会被取用。
description: nas所在专用网络的交换机id,nasMountAddr为空时不会被取用。
refresh:
title: 刷新缓存
type: bool
default: 0
description: 不使用缓存;并以此次部署配置为准,覆盖原有缓存
8 changes: 5 additions & 3 deletions src/s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ vars: # 全局变量
vpcId: {{ vpcId }}
securityGroupId: {{ securityGroupId }}
vSwitchIds: {{ vSwitchIds }}
refresh: {{ refresh }}
resources:
model_cache:
component: 'fc3'
Expand Down Expand Up @@ -77,10 +78,9 @@ resources:
nasConfig: ${resources.model_cache.output.nasConfig}
customContainerConfig:
image: registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-py310-torch2.3.0-1.16.0-fc
command: ["/bin/sh", "-c", "wget https://modelscope.oss-cn-beijing.aliyuncs.com/swingdeploy/pre/deploy.tar; tar xvf deploy.tar; /bin/bash script/run_deploy.sh"]
command: ["/bin/sh", "-c", "wget https://modelscope.oss-cn-beijing.aliyuncs.com/swingdeploy/pre/deploy.tar; tar xvf deploy.tar; /bin/bash script/run_download.sh"]
port: 9001
environmentVariables:
FC_FUNC: download
DEPLOY_PLATFORM: fc
MODEL_ID: ${vars.modelID}
MODEL_VERSION: ${vars.modelRevision}
Expand All @@ -92,6 +92,7 @@ resources:
TEMPLATE_FILE_URL: https://modelscope.oss-cn-beijing.aliyuncs.com/${vars.templateFile}
MODEL_BACKEND: ${vars.modelBackend}
SERVED_MODEL_NAME: ${vars.servedModelName}
REFRESH: ${vars.refresh}

model_meta_func:
component: 'fc3'
Expand Down Expand Up @@ -164,7 +165,7 @@ resources:
command: ["/bin/sh", "-c", "wget https://modelscope.oss-cn-beijing.aliyuncs.com/swingdeploy/pre/deploy.tar; tar xvf deploy.tar; /bin/bash script/run_deploy.sh"]
port: 9000
environmentVariables:
FC_FUNC: app
DEPLOY_PLATFORM: 'fc'
MODEL_ID: ${vars.modelID}
MODEL_VERSION: ${vars.modelRevision}
MODELSCOPE_CACHE: ${resources.model_cache.output.nasConfig.mountPoints.0.mountDir}/
Expand All @@ -176,6 +177,7 @@ resources:
MODELSCOPE_DOMAIN: ${vars.modelCache}
MODEL_BACKEND: ${vars.modelBackend}
DEPLOY_ENV: '${vars.deployEnv}'
REFRESH: ${vars.refresh}
triggers:
- triggerName: httpTrigger
triggerType: http
Expand Down

0 comments on commit b9cf261

Please sign in to comment.