26 lines
1016 B
Docker
26 lines
1016 B
Docker
|
|
FROM corex:4.3.8
|
|||
|
|
|
|||
|
|
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 libasound2-dev patchelf; \
|
|||
|
|
rm -rf /var/lib/apt/lists/*
|
|||
|
|
|
|||
|
|
ADD . /root/
|
|||
|
|
|
|||
|
|
COPY requirements.txt /root
|
|||
|
|
RUN pip install -r requirements.txt -i https://nexus.4pd.io/repository/pypi-all/simple --extra-index-url https://mirror.sjtu.edu.cn/pypi/web/simple
|
|||
|
|
COPY sherpa_onnx-1.12.5+corex4.3.8-cp310-cp310-linux_x86_64.whl /root
|
|||
|
|
RUN pip install ./sherpa_onnx-1.12.5+corex4.3.8-cp310-cp310-linux_x86_64.whl
|
|||
|
|
|
|||
|
|
ENV LD_LIBRARY_PATH=/usr/local/corex-4.3.8/lib64/python3/dist-packages/tvm/:$LD_LIBRARY_PATH
|
|||
|
|
|
|||
|
|
ENTRYPOINT ["python3"]
|
|||
|
|
CMD ["./main_sherpa.py"]
|