From d6c8564e3ee539f10cf6591b7a8ea23d60e9d23e Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Tue, 16 Jul 2024 04:14:15 +0400 Subject: [PATCH] TorchAudio installation workaround for incorrect `PYTORCH_VERSION` env variable (#9736) Signed-off-by: Vladimir Bataev --- scripts/installers/install_torchaudio_latest.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/installers/install_torchaudio_latest.sh b/scripts/installers/install_torchaudio_latest.sh index 9e72be5e51d6..bdad771fe267 100755 --- a/scripts/installers/install_torchaudio_latest.sh +++ b/scripts/installers/install_torchaudio_latest.sh @@ -92,10 +92,12 @@ echo "Installing torchaudio from branch: ${INSTALL_BRANCH}" pip install parameterized # Build torchaudio and run MFCC test +# NB: setting PYTORCH_VERSION is a workaround for the case where PYTORCH_VERSION is set, but contains incorrect value +# e.g., in container nvcr.io/nvidia/pytorch:24.03-py3 git clone --depth 1 --branch ${INSTALL_BRANCH} https://github.com/pytorch/audio.git && \ cd audio && \ git submodule update --init --recursive && \ -USE_FFMPEG=1 BUILD_SOX=1 BUILD_VERSION=${TORCHAUDIO_BUILD_VERSION} python setup.py install && \ +PYTORCH_VERSION=${TORCH_FULL_VERSION} USE_FFMPEG=1 BUILD_SOX=1 BUILD_VERSION=${TORCHAUDIO_BUILD_VERSION} python setup.py install && \ cd .. && \ pytest -rs audio/test/torchaudio_unittest/transforms/torchscript_consistency_cpu_test.py -k 'test_MFCC' || \ { echo "ERROR: Failed to install torchaudio!"; exit 1; };