25 lines
1.1 KiB
Docker
25 lines
1.1 KiB
Docker
FROM git.modelhub.org.cn:9443/enginex-iluvatar/mr-bi150-4.3.0-x86-ubuntu20.04-py3.10-poc-llm-infer:v1.2.3
|
||
|
||
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
|