ARG METAX_BASE_IMAGE FROM ${METAX_BASE_IMAGE} ARG PYTHON_BIN=/opt/conda/bin/python 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=metax \ DEVICE=auto \ APP_PYTHON_BIN=${PYTHON_BIN} # MetaX production images should be built on top of an official MetaX vLLM # image that already contains MACA, PyTorch, vLLM, and their compiled kernels. # We only add generic project/runtime dependencies and the application code. RUN if [ "${INSTALL_SYSTEM_PACKAGES}" = "true" ]; then \ apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip python3-venv ffmpeg sox libsox-dev libsndfile1 nginx \ && apt-get clean && rm -rf /var/lib/apt/lists/*; \ fi WORKDIR /app COPY environments/metax/requirements.txt /tmp/qwen3-asr-metax-requirements.txt RUN ${APP_PYTHON_BIN} -m pip install \ --no-cache-dir \ --no-warn-conflicts \ --root-user-action=ignore \ -r /tmp/qwen3-asr-metax-requirements.txt && \ rm -f /tmp/qwen3-asr-metax-requirements.txt RUN ${APP_PYTHON_BIN} - <<'PY' import importlib import torch print("torch", torch.__version__) print("torch.cuda.is_available", torch.cuda.is_available()) for name in ("vllm",): module = importlib.import_module(name) print(name, getattr(module, "__version__", "unknown")) PY 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 ["/opt/conda/bin/python", "start.py"]