From 9019db91274ca2dc6112cc9f369b6795b415ec5b Mon Sep 17 00:00:00 2001 From: zhifu gao <zhifu.gzf@alibaba-inc.com> Date: 星期日, 02 七月 2023 09:16:31 +0800 Subject: [PATCH] Dev deploy (#696) --- funasr/runtime/docs/SDK_tutorial_zh.md | 70 ++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 30 deletions(-) diff --git a/funasr/runtime/docs/SDK_tutorial_zh.md b/funasr/runtime/docs/SDK_tutorial_zh.md index 4842057..4b4909f 100644 --- a/funasr/runtime/docs/SDK_tutorial_zh.md +++ b/funasr/runtime/docs/SDK_tutorial_zh.md @@ -20,9 +20,9 @@ 閫氳繃浠ヤ笅鍛戒护杩愯涓�閿儴缃叉湇鍔★紝鎸夌収鎻愮ず閫愭瀹屾垚FunASR runtime-SDK鏈嶅姟鐨勯儴缃插拰杩愯銆傜洰鍓嶆殏鏃朵粎鏀寔Linux鐜锛屽叾浠栫幆澧冨弬鑰冩枃妗楂橀樁寮�鍙戞寚鍗梋(./SDK_advanced_guide_cn.md) ```shell -curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/funasr-runtime-deploy.sh; sudo bash funasr-runtime-deploy.sh install +curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/dev_deploy/funasr/runtime/funasr-runtime-deploy-offline-cpu-zh.sh; sudo bash funasr-runtime-deploy-offline-cpu-zh.sh install # 濡傞亣鍒扮綉缁滈棶棰橈紝涓浗澶ч檰鐢ㄦ埛锛屽彲浠ョ敤涓笅闈㈢殑鍛戒护锛� -# curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy.sh; sudo bash funasr-runtime-deploy.sh install +# curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy-offline-cpu-zh.sh; sudo bash funasr-runtime-deploy-offline-cpu-zh install ``` ### 瀹㈡埛绔祴璇曚笌浣跨敤 @@ -92,20 +92,20 @@ 涓�閿儴缃插悗鑻ュ嚭鐜伴噸鍚數鑴戠瓑鍏抽棴Docker鐨勫姩浣滐紝鍙�氳繃濡備笅鍛戒护鐩存帴鍚姩FunASR鏈嶅姟锛屽惎鍔ㄩ厤缃负涓婃涓�閿儴缃茬殑璁剧疆銆� ```shell -sudo bash funasr-runtime-deploy.sh start +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh start ``` ### 鍏抽棴FunASR鏈嶅姟 ```shell -sudo bash funasr-runtime-deploy.sh stop +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh stop ``` ### 閲嶅惎FunASR鏈嶅姟 鏍规嵁涓婃涓�閿儴缃茬殑璁剧疆閲嶅惎鍚姩FunASR鏈嶅姟銆� ```shell -sudo bash funasr-runtime-deploy.sh restart +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh restart ``` ### 鏇挎崲妯″瀷骞堕噸鍚疐unASR鏈嶅姟 @@ -113,49 +113,59 @@ 鏇挎崲姝e湪浣跨敤鐨勬ā鍨嬶紝骞堕噸鏂板惎鍔‵unASR鏈嶅姟銆傛ā鍨嬮渶涓篗odelScope涓殑ASR/VAD/PUNC妯″瀷锛屾垨鑰呬粠ModelScope涓ā鍨媐inetune鍚庣殑妯″瀷銆� ```shell -sudo bash funasr-runtime-deploy.sh update model <model ID> +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update [asr_model | vad_model | punc_model] <model_id or local model path> e.g -sudo bash funasr-runtime-deploy.sh update model damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update asr_model damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch +``` + +### 鏇存柊鍙傛暟骞堕噸鍚疐unASR鏈嶅姟 + +鏇存柊宸查厤缃弬鏁帮紝骞堕噸鏂板惎鍔‵unASR鏈嶅姟鐢熸晥銆傚彲鏇存柊鍙傛暟鍖呮嫭瀹夸富鏈哄拰Docker鐨勭鍙e彿锛屼互鍙婃帹鐞嗗拰IO鐨勭嚎绋嬫暟閲忋�� + +```shell +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update [host_port | docker_port] <port number> +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update [decode_thread_num | io_thread_num] <the number of threads> + +e.g +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update decode_thread_num 32 ``` ## 鏈嶅姟绔惎鍔ㄨ繃绋嬮厤缃瑙� -##### 閫夋嫨FunASR Docker闀滃儚 -鎺ㄨ崘閫夋嫨latest浣跨敤鎴戜滑鐨勬渶鏂伴暅鍍忥紝涔熷彲閫夋嫨鍘嗗彶鐗堟湰銆� +##### 璁剧疆瀹夸富鏈虹殑宸ヤ綔绌洪棿璺緞 +榛樿灏嗗湪鎿嶄綔鐩綍涓嬪垱寤篺unasr-runtime-sdk浣滀负宸ヤ綔绌洪棿璺緞 ```text -[1/9] +[1/6] + Please enter the local path of workspace. + Setting the local path of workspace, default(/root/funasr-runtime-sdk): + The local workspace path is /root/funasr-runtime-sdk . + The models will store in local path(/root/funasr-runtime-sdk/models) during the run. +``` + +##### 閫夋嫨FunASR Docker闀滃儚 +鎺ㄨ崘閫夋嫨1)浣跨敤鎴戜滑鐨勬渶鏂板彂甯冪増闀滃儚锛屼篃鍙�夋嫨鍘嗗彶鐗堟湰銆� +```text +[2/6] + Getting the list of docker images, please wait a few seconds. + [DONE] + Please choose the Docker image. - 1) registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-latest - 2) registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.1.0 - Enter your choice: 1 - You have chosen the Docker image: registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-latest + 1) registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.1.0 + Enter your choice, default(1): + You have chosen the Docker image: registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.1.0 ``` ##### 璁剧疆瀹夸富鏈烘彁渚涚粰FunASR鐨勭鍙� 璁剧疆鎻愪緵缁橠ocker鐨勫涓绘満绔彛锛岄粯璁や负10095銆傝淇濊瘉姝ょ鍙e彲鐢ㄣ�� ```text -[4/9] +[3/6] Please input the opened port in the host used for FunASR server. - Default: 10095 - Setting the opened host port [1-65535]: + Setting the opened host port [1-65535], default(10095): The port of the host is 10095 The port in Docker for FunASR server is 10095 -``` - - -##### 璁剧疆FunASR鏈嶅姟鐨勬帹鐞嗙嚎绋嬫暟 -璁剧疆FunASR鏈嶅姟鐨勬帹鐞嗙嚎绋嬫暟锛岄粯璁や负瀹夸富鏈烘牳鏁帮紝鍚屾椂鑷姩璁剧疆鏈嶅姟鐨処O绾跨▼鏁帮紝涓烘帹鐞嗙嚎绋嬫暟鐨勫洓鍒嗕箣涓�銆� -```text -[5/9] - Please input thread number for FunASR decoder. - Default: 1 - Setting the number of decoder thread: - - The number of decoder threads is 1 - The number of IO threads is 1 ``` -- Gitblit v1.9.1