41 lines
1.4 KiB
Docker
41 lines
1.4 KiB
Docker
ARG MTHREADS_BASE_IMAGE=registry.mthreads.com/presale/devtech/vllm_musa:s4000_4.3.5_d0519
|
|
FROM ${MTHREADS_BASE_IMAGE}
|
|
|
|
ARG PYTHON_BIN=python3
|
|
ARG INSTALL_SYSTEM_PACKAGES=true
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
HF_HUB_DISABLE_SYMLINKS_WARNING=1 \
|
|
HF_HUB_DISABLE_PROGRESS_BARS=1 \
|
|
PIP_BREAK_SYSTEM_PACKAGES=1 \
|
|
ACCELERATOR=mthreads \
|
|
DEVICE=auto \
|
|
APP_PYTHON_BIN=${PYTHON_BIN}
|
|
|
|
# Moore Threads production images should be built on top of the official MUSA
|
|
# vLLM image. Keep the vendor Python/runtime stack intact and only add the
|
|
# extra system tools needed by the application.
|
|
RUN if [ "${INSTALL_SYSTEM_PACKAGES}" = "true" ]; then \
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
ffmpeg sox libsox-dev libsndfile1 nginx \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*; \
|
|
fi
|
|
|
|
WORKDIR /app
|
|
|
|
COPY environments/mthreads/requirements.txt /tmp/qwen3-asr-mthreads-requirements.txt
|
|
RUN ${APP_PYTHON_BIN} -m pip install --no-cache-dir -r /tmp/qwen3-asr-mthreads-requirements.txt && \
|
|
rm -f /tmp/qwen3-asr-mthreads-requirements.txt
|
|
|
|
COPY . .
|
|
|
|
RUN mkdir -p /app/data/temp /app/data/logs /app/data/tasks \
|
|
&& chmod +x start.py /app/scripts/docker/entrypoint.sh
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/app/scripts/docker/entrypoint.sh"]
|
|
CMD ["python3", "start.py"]
|