Add fastapi service
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
FROM corex:4.3.0
|
||||
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
|
||||
|
||||
COPY requirements.txt /root
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
RUN sed -i 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list \
|
||||
&& sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list \
|
||||
&& sed -i 's|buster-updates|buster|g' /etc/apt/sources.list \
|
||||
&& printf 'Acquire::Check-Valid-Until "false";\n' > /etc/apt/apt.conf.d/99no-check-valid \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN apt update && apt install -y vim net-tools
|
||||
|
||||
RUN pip install funasr==1.2.6 openai-whisper
|
||||
|
||||
ADD . /root/
|
||||
ADD nltk_data.tar.gz /root/
|
||||
RUN tar -xvzf nltk_data.tar.gz
|
||||
ENV NLTK_DATA=/root/nltk_data
|
||||
|
||||
RUN cp ./replaced_files/mr_v100/cif_predictor.py /usr/local/lib/python3.10/site-packages/funasr/models/paraformer/
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["bash"]
|
||||
CMD ["./start_funasr.sh"]
|
||||
COPY requirements.txt /root
|
||||
RUN pip install -r /root/requirements.txt -i https://nexus.4pd.io/repository/pypi-all/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
|
||||
|
||||
Reference in New Issue
Block a user