From fe29af175ca396bd62dcdf5f08d6e7429049f1b0 Mon Sep 17 00:00:00 2001 From: remi-or Date: Mon, 1 Sep 2025 15:53:19 +0000 Subject: [PATCH] Pin torchcodec to 0.5 in AMD docker --- docker/transformers-pytorch-amd-gpu/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/transformers-pytorch-amd-gpu/Dockerfile b/docker/transformers-pytorch-amd-gpu/Dockerfile index 674cd047a8d4..37542ffb8943 100644 --- a/docker/transformers-pytorch-amd-gpu/Dockerfile +++ b/docker/transformers-pytorch-amd-gpu/Dockerfile @@ -20,8 +20,6 @@ WORKDIR / ADD https://api.github.com/repos/huggingface/transformers/git/refs/heads/main version.json RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF -# On ROCm, torchcodec is required to decode audio files -# RUN python3 -m pip install --no-cache-dir torchcodec # Install transformers RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video,audio] @@ -37,3 +35,6 @@ RUN python3 -m pip uninstall py3nvml pynvml nvidia-ml-py apex -y # `kernels` may causes many failing tests RUN python3 -m pip uninstall -y kernels + +# On ROCm, torchcodec is required to decode audio files and 0.4 or 0.6 fails +RUN python3 -m pip install --no-cache-dir "torchcodec==0.5"