From 0942011665e003f954d85bbafa354b2470f64af2 Mon Sep 17 00:00:00 2001 From: xdtbynd <231153518+xdtbynd@users.noreply.github.com> Date: Mon, 25 May 2026 16:30:12 +0800 Subject: [PATCH] [NPU] Add torchaudio dependency for NPU platform (#26267) --- docker/npu.Dockerfile | 3 ++- python/pyproject_npu.toml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/npu.Dockerfile b/docker/npu.Dockerfile index bf135b293..44a8cbaf3 100644 --- a/docker/npu.Dockerfile +++ b/docker/npu.Dockerfile @@ -13,6 +13,7 @@ ARG PIP_INDEX_URL="https://pypi.org/simple/" ARG APTMIRROR="" ARG PYTORCH_VERSION="2.8.0" ARG TORCHVISION_VERSION="0.23.0" +ARG TORCHAUDIO_VERSION="2.8.0" ARG PTA_URL_ARM64="https://gitcode.com/Ascend/pytorch/releases/download/v7.3.0-pytorch2.8.0/torch_npu-2.8.0.post2-cp311-cp311-manylinux_2_28_aarch64.whl" ARG PTA_URL_AMD64="https://gitcode.com/Ascend/pytorch/releases/download/v7.3.0-pytorch2.8.0/torch_npu-2.8.0.post2-cp311-cp311-manylinux_2_28_x86_64.whl" ARG SGLANG_TAG=main @@ -78,7 +79,7 @@ RUN ${PIP_INSTALL} sglang-router ### Install PyTorch and PTA RUN . /etc/environment_new && \ - (${PIP_INSTALL} torch==${PYTORCH_VERSION} torchvision==${TORCHVISION_VERSION} --index-url https://download.pytorch.org/whl/cpu) \ + (${PIP_INSTALL} torch==${PYTORCH_VERSION} torchvision==${TORCHVISION_VERSION} torchaudio==${TORCHAUDIO_VERSION} --index-url https://download.pytorch.org/whl/cpu) \ && (${PIP_INSTALL} ${PTA_URL}) diff --git a/python/pyproject_npu.toml b/python/pyproject_npu.toml index 6fb3b95d6..475756345 100644 --- a/python/pyproject_npu.toml +++ b/python/pyproject_npu.toml @@ -57,6 +57,7 @@ dependencies = [ "tiktoken", "timm==1.0.16", "torchao==0.9.0", + "torchaudio==2.8.0", "tqdm", "mistral_common>=1.11.0", "transformers==5.8.1",