FROM git.modelhub.org.cn:9443/enginex-ascend/vllm-ascend:v0.10.0rc1

WORKDIR /workspace

RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
    echo "deb [trusted=yes] https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse" > /etc/apt/sources.list && \
    echo "deb [trusted=yes] https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
    echo "deb [trusted=yes] https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse" >> /etc/apt/sources.list && \
    echo "deb [trusted=yes] https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse" >> /etc/apt/sources.list && \
    apt-get update && \
    apt-get install -y espeak-ng && \
    rm -rf /var/lib/apt/lists/*

COPY requirements_matcha.txt constraints_matcha.txt matcha_server.py launch_matcha.sh /workspace/

RUN pip install -r requirements_matcha.txt -c constraints_matcha.txt 
RUN pip install matcha-tts -c constraints_matcha.txt

ENTRYPOINT ["/bin/bash", "launch_matcha.sh"]
