修改Dockerfile,使其直接利用最新的requirements.txt安装Python包;并在构建过程中预先下载moda ASR和nltk相关的模型到镜像中以便加快初次运行的速度

This commit is contained in:
Kenn Zhang
2024-01-27 15:15:08 +08:00
parent f9387e0af8
commit d86ffa2386
6 changed files with 22 additions and 21 deletions

7
Docker/download.py Normal file
View File

@@ -0,0 +1,7 @@
# Download moda ASR related models
from modelscope import snapshot_download
model_dir = snapshot_download('damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch')
model_dir = snapshot_download('damo/speech_fsmn_vad_zh-cn-16k-common-pytorch')
model_dir = snapshot_download('damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch')