FROM harbor-contest.4pd.io/luxinlong02/sherpa-onnx-offline-asr:1.12.5-mr100-corex-4.3.0-zh-en

WORKDIR /workspace/
COPY ./model_test_caltech_http_mr100.py /workspace/
COPY ./microsoft_beit_base_patch16_224_pt22k_ft22k /model

# Try common distros; the first that exists will succeed
RUN (apt-get update && apt-get install -y python3-pip) || \
    (microdnf install -y python3-pip) || \
    (dnf install -y python3-pip) || \
    (yum install -y python3-pip) || \
    (apk add --no-cache py3-pip)

# 安装transformers 4.46.3
RUN python3 -m pip install --no-cache-dir transformers==4.46.3


RUN python3 -m pip install flask==3.1.1

EXPOSE 80

ENTRYPOINT ["python3", "model_test_caltech_http_mr100.py"]

