diff --git a/publish.yaml b/publish.yaml index dded203..0d4951b 100644 --- a/publish.yaml +++ b/publish.yaml @@ -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为空时不会被取用。 \ No newline at end of file + description: nas所在专用网络的交换机id,nasMountAddr为空时不会被取用。 + refresh: + title: 刷新缓存 + type: bool + default: 0 + description: 不使用缓存;并以此次部署配置为准,覆盖原有缓存 \ No newline at end of file diff --git a/src/s.yaml b/src/s.yaml index 0b7d512..c7b62dd 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -27,6 +27,7 @@ vars: # 全局变量 vpcId: {{ vpcId }} securityGroupId: {{ securityGroupId }} vSwitchIds: {{ vSwitchIds }} + refresh: {{ refresh }} resources: model_cache: component: 'fc3' @@ -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} @@ -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' @@ -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}/ @@ -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