Pin torchvision, torch, and torchaudio versions#13757
Conversation
|
I think we tend to pin/unpin frequently enough that we can add build args to the env section in In the build images workflow env:
REGISTRY: diffusers
CI_SLACK_CHANNEL: ${{ secrets.CI_DOCKER_CHANNEL }}
TORCH_VERSION: 2.10.0 # set to "" to use latest Update the build instructions with:
no-cache: true
context: ./docker/${{ matrix.image-name }}
push: true
tags: ${{ env.REGISTRY }}/${{ matrix.image-name }}:latest
build-args: |
TORCH_VERSION=${{ env.TORCH_VERSION }}
Inside the Dockerfile, we would need RUN uv pip install --no-cache-dir \
"torch${TORCH_VERSION:+==${TORCH_VERSION}}" \
torchvision \
torchaudio \
--extra-index-url https://download.pytorch.org/whl/cpu |
But when we do RUN uv pip install --no-cache-dir \
torch \
torchvision \
torchaudio somehow the resolution isn't appropriate.
This feels inappropriate for non-CPU envs i.e., for the GPU docker containers. |
|
@DN6 a gentle ping on the above because it affects our slow CI. |
|
fast tests are failing too now, let's merge in to see if it got fixed? |
|
@yiyixuxu going to merge after pushing the Docker containers: https://github.com/huggingface/diffusers/actions/runs/26613347105 The fast tests seem okay on: #13781 The failures are unrelated to env setup. |
What does this PR do?
Facing torchvision problems because of unpinned versions:
https://github.com/huggingface/diffusers/actions/runs/25903410768/job/76131726872?pr=13733
This PR should fix it.
Pushed the Docker containers too: https://github.com/huggingface/diffusers/actions/runs/25907563120.
Tested with the container and verified that it's working as expected.