CoolFace
Apppublic

Bread-F/Intelligent-Medical-Guidance-Large-Model

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
deploy.sh87 linesDownload Raw Back to root
1#!/bin/bash2 3# 检查参数个数4if [ "$#" -ne 1 ]; then5    echo "Error: 必须且只能提供一个参数."6    echo "可用的选项为: tts, dg, asr, llm, base 或者 frontend."7    exit 18fi9 10# 进入虚拟环境11# conda deactivate12conda activate streamer-sales13 14# 可选配置显卡 15# export CUDA_VISIBLE_DEVICES=116 17# 配置 huggingface 国内镜像地址18export HF_ENDPOINT="https://hf-mirror.com"19 20case $1 in21    tts)22        echo "正在启动 TTS 服务..."23        uvicorn server.tts.tts_server:app --host 0.0.0.0 --port 800124        ;;25 26    dg)27        echo "正在启动 数字人 服务..."28        uvicorn server.digital_human.digital_human_server:app --host 0.0.0.0 --port 800229        ;;30 31    asr)32        echo "正在启动 ASR 服务..."33        export MODELSCOPE_CACHE="./weights/asr_weights"34        uvicorn server.asr.asr_server:app --host 0.0.0.0 --port 800335        ;;36 37    llm)38        echo "正在启动 LLM 服务..."39        export LMDEPLOY_USE_MODELSCOPE=True40        export MODELSCOPE_CACHE="./weights/llm_weights"41        lmdeploy serve api_server HinGwenWoong/streamer-sales-lelemiao-7b \42                                  --server-port 23333 \43                                  --model-name internlm2 \44                                  --session-len 32768 \45                                  --cache-max-entry-count 0.1 \46                                  --model-format hf47        ;;48 49    llm-4bit)50        echo "正在启动 LLM-4bit 服务..."51        export LMDEPLOY_USE_MODELSCOPE=True52        export MODELSCOPE_CACHE="./weights/llm_weights"53        lmdeploy serve api_server HinGwenWoong/streamer-sales-lelemiao-7b-4bit \54                                  --server-port 23333 \55                                  --model-name internlm2 \56                                  --session-len 32768 \57                                  --cache-max-entry-count 0.1 \58                                  --model-format awq59        ;;60 61    base)62        echo "正在启动 中台 服务..."63        # Agent Key (如果有请配置,没有请忽略)64        # export DELIVERY_TIME_API_KEY="${快递 EBusinessID},${快递 api_key}"65        # export WEATHER_API_KEY="${天气 API key}"66        uvicorn server.base.base_server:app --host 0.0.0.0 --port 800067        ;;68 69    frontend)70        echo "正在启动 前端 服务..."71        cd frontend72        # npm install73        npm run dev74        ;;75 76    *)77        echo "错误: 不支持的参数 '$1'."78        echo "可用的选项为: tts, dg, asr, llm, llm-4bit, base 或者 frontend."79        exit 180        ;;81esac82 83exit 084 85 86 87