add: 部署文件

This commit is contained in:
lizhongxiang 2025-02-26 14:31:18 +08:00
parent 854ee9782a
commit 04af9d6b60
2 changed files with 12 additions and 1 deletions

View file

@ -61,4 +61,4 @@ ENV PATH="/opt/venv/bin:$PATH"
COPY . . COPY . .
# 启动应用 # 启动应用
CMD ["python", "app.py"] CMD ["./entrypoint-api.sh"]

11
entrypoint-api.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
# 检查 asr-models/SenseVoiceSmall 目录是否存在
if [ ! -d "asr-models/SenseVoiceSmall" ]; then
# 如果目录不存在,执行下载脚本
python modelscope_model_download.py
fi
# 执行 app.py
python app.py