From e6f6da4dcd39dbf6f6e643cf19685e21ae473087 Mon Sep 17 00:00:00 2001 From: suluyana Date: Tue, 15 Oct 2024 20:24:06 +0800 Subject: [PATCH 1/7] model download: use image for merging splitted files. --- src/s.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/s.yaml b/src/s.yaml index 8456bd3..90f2495 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -48,18 +48,20 @@ resources: role: ${vars.role} functionName: ${vars.name}-model-download-func description: initialize model into nas storage - handler: index.handler + handler: not-used timeout: 86400 memorySize: 16384 cpu: 8 diskSize: 10240 instanceType: e1 instanceConcurrency: 1 - runtime: python3.9 - code: ./model_download + runtime: custom-container internetAccess: true vpcConfig: ${resources.model_cache.output.vpcConfig} nasConfig: ${resources.model_cache.output.nasConfig} + customContainerConfig: + image: registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:model_download-0.0.1 + port: 9000 environmentVariables: MODEL_ID: ${vars.modelID} MODEL_VERSION: ${vars.modelRevision} From 1e5b1356ca01b49f2d3ff02891d29aa9bdcf6c6d Mon Sep 17 00:00:00 2001 From: suluyana Date: Tue, 22 Oct 2024 10:43:16 +0800 Subject: [PATCH 2/7] instanceConcurrency 4 -> 5 --- src/s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s.yaml b/src/s.yaml index 90f2495..4ede627 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -132,7 +132,7 @@ resources: {{ if instanceType != 'c1' && instanceType != 'e1' }}gpuConfig: gpuMemorySize: ${vars.gpuMemorySize} gpuType: ${vars.instanceType}{{ else }}instanceType: ${vars.instanceType}{{ /if }} - instanceConcurrency: 4 + instanceConcurrency: 5 runtime: custom-container initializer: 'true' initializationTimeout: 300 From 8c24a566d19ec857b08628ab6c4c8a22bf7e1c62 Mon Sep 17 00:00:00 2001 From: suluyana Date: Wed, 30 Oct 2024 19:22:18 +0800 Subject: [PATCH 3/7] set to pre --- src/s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s.yaml b/src/s.yaml index 4ede627..12baa9b 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -141,7 +141,7 @@ resources: nasConfig: ${resources.model_cache.output.nasConfig} customContainerConfig: image: {{ if imageTag == 'ubuntu22.04-cuda12.1.0-py310-torch2.3.0-tf2.16.1-1.16.0-fc' || imageTag == 'ubuntu22.04-py310-torch2.3.0-1.16.0-fc' || imageTag == 'ubuntu22.04-cuda12.1.0-py310-torch2.3.0-tf2.16.1-1.16.0based-1.18.1-fc' || imageTag == 'fc-deploy-common-v17.3.3'}}registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:${vars.version}{{ else }}modelscope-registry.${vars.region}.cr.aliyuncs.com/modelscope-repo/modelscope:${vars.version}{{/if}} - command: ["/bin/sh", "-c", "wget https://modelscope.oss-cn-beijing.aliyuncs.com/swingdeploy/deploy.tar; tar xvf deploy.tar; /bin/bash script/run_${vars.modelBackend}.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_${vars.modelBackend}.sh"] port: 9000 environmentVariables: MODEL_ID: ${vars.modelID} From 8d105651ee34fd11f4ef57166b362137e53234a4 Mon Sep 17 00:00:00 2001 From: suluyana Date: Thu, 31 Oct 2024 10:18:01 +0800 Subject: [PATCH 4/7] Revert "model download: use image for merging splitted files." This reverts commit e6f6da4dcd39dbf6f6e643cf19685e21ae473087. --- src/s.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/s.yaml b/src/s.yaml index 12baa9b..20693c1 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -48,20 +48,18 @@ resources: role: ${vars.role} functionName: ${vars.name}-model-download-func description: initialize model into nas storage - handler: not-used + handler: index.handler timeout: 86400 memorySize: 16384 cpu: 8 diskSize: 10240 instanceType: e1 instanceConcurrency: 1 - runtime: custom-container + runtime: python3.9 + code: ./model_download internetAccess: true vpcConfig: ${resources.model_cache.output.vpcConfig} nasConfig: ${resources.model_cache.output.nasConfig} - customContainerConfig: - image: registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:model_download-0.0.1 - port: 9000 environmentVariables: MODEL_ID: ${vars.modelID} MODEL_VERSION: ${vars.modelRevision} From 3fa77dd5f0f2582069355f407941e4014fea44fd Mon Sep 17 00:00:00 2001 From: suluyana Date: Thu, 31 Oct 2024 18:02:47 +0800 Subject: [PATCH 5/7] using personal acr --- src/s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s.yaml b/src/s.yaml index 20693c1..53d3769 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -138,7 +138,7 @@ resources: vpcConfig: ${resources.model_cache.output.vpcConfig} nasConfig: ${resources.model_cache.output.nasConfig} customContainerConfig: - image: {{ if imageTag == 'ubuntu22.04-cuda12.1.0-py310-torch2.3.0-tf2.16.1-1.16.0-fc' || imageTag == 'ubuntu22.04-py310-torch2.3.0-1.16.0-fc' || imageTag == 'ubuntu22.04-cuda12.1.0-py310-torch2.3.0-tf2.16.1-1.16.0based-1.18.1-fc' || imageTag == 'fc-deploy-common-v17.3.3'}}registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:${vars.version}{{ else }}modelscope-registry.${vars.region}.cr.aliyuncs.com/modelscope-repo/modelscope:${vars.version}{{/if}} + image: registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:${vars.version} command: ["/bin/sh", "-c", "wget https://modelscope.oss-cn-beijing.aliyuncs.com/swingdeploy/pre/deploy.tar; tar xvf deploy.tar; /bin/bash script/run_${vars.modelBackend}.sh"] port: 9000 environmentVariables: From c9ef248b681f4ccd359200a20178b41be4fa0435 Mon Sep 17 00:00:00 2001 From: suluyana Date: Mon, 4 Nov 2024 16:58:40 +0800 Subject: [PATCH 6/7] test merge the split --- src/s.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/s.yaml b/src/s.yaml index 53d3769..d656cfb 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -48,18 +48,20 @@ resources: role: ${vars.role} functionName: ${vars.name}-model-download-func description: initialize model into nas storage - handler: index.handler + handler: not-used timeout: 86400 memorySize: 16384 cpu: 8 diskSize: 10240 instanceType: e1 instanceConcurrency: 1 - runtime: python3.9 - code: ./model_download + runtime: custom-container internetAccess: true vpcConfig: ${resources.model_cache.output.vpcConfig} nasConfig: ${resources.model_cache.output.nasConfig} + customContainerConfig: + image: registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:model_download-0.0.2 + port: 9000 environmentVariables: MODEL_ID: ${vars.modelID} MODEL_VERSION: ${vars.modelRevision} From e95544f898caec034775d606e7f7a64d8298da2d Mon Sep 17 00:00:00 2001 From: suluyana Date: Thu, 7 Nov 2024 20:24:59 +0800 Subject: [PATCH 7/7] update download --- src/s.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/s.yaml b/src/s.yaml index d656cfb..c056443 100644 --- a/src/s.yaml +++ b/src/s.yaml @@ -60,8 +60,9 @@ resources: vpcConfig: ${resources.model_cache.output.vpcConfig} nasConfig: ${resources.model_cache.output.nasConfig} customContainerConfig: - image: registry.${vars.region}.aliyuncs.com/modelscope-repo/modelscope:model_download-0.0.2 - port: 9000 + 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/download.tar; tar xvf download.tar; /bin/bash model_download/download.sh"] + port: 9001 environmentVariables: MODEL_ID: ${vars.modelID} MODEL_VERSION: ${vars.modelRevision}