diff --git a/Dockerfile.funasr-a100 b/Dockerfile.funasr-a100 new file mode 100644 index 0000000..04d33f0 --- /dev/null +++ b/Dockerfile.funasr-a100 @@ -0,0 +1,24 @@ +FROM FROM harbor-contest.4pd.io/luxinlong02/funasr:a100-server-0.1 + +WORKDIR /root + +RUN set -eux; \ + # 1) 把 aliyun 源替换成官方源(避免 403) + sed -i -E 's|http://mirrors\.aliyun\.com/ubuntu|http://archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list; \ + sed -i -E 's|http://mirrors\.aliyun\.com/ubuntu|http://archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list.d/*.list 2>/dev/null || true; \ + \ + # 2) 更新并安装 + apt-get update; \ + apt-get install -y --no-install-recommends vim net-tools ca-certificates; \ + rm -rf /var/lib/apt/lists/* + +ADD . /root/ +ADD nltk_data.tar.gz /root/ +ENV NLTK_DATA=/root/nltk_data + +COPY requirements.txt /root +RUN pip install -r /root/requirements.txt -i https://nexus.4pd.io/repository/pypi-all/simple --extra-index-url https://mirror.sjtu.edu.cn/pypi/web/simple +# Patch files +COPY fastapi_funasr.py /root/fastapi_funasr.py +COPY ./replaced_files/mr_v100/cif_predictor.py /usr/local/lib/python3.10/site-packages/funasr/models/paraformer/ +COPY ./replaced_files/funasr_nano_model.py /usr/local/lib/python3.10/site-packages/funasr/models/fun_asr_nano/model.py