Conversation
ydshieh
commented
Oct 27, 2025
Comment on lines
+16
to
+17
| # This needs to be compatible with the above `PYTORCH`. | ||
| ARG TORCHCODEC='0.7.0' |
Collaborator
Author
There was a problem hiding this comment.
At this moment, we have to use torchcodec+cpu.
See meta-pytorch/torchcodec#912 (comment)
And this forces us to install torchcodec separately from torch but need them to be version compatible
ydshieh
commented
Oct 27, 2025
Comment on lines
+30
to
+64
| # 2. For `torchcodec`, use `cpu` as we don't have `libnvcuvid.so` on the host runner. See https://github.com/meta-pytorch/torchcodec/issues/912 | ||
| # **Important**: We need to specify `torchcodec` version if the torch version is not the latest stable one. | ||
| # 3. `set -e` means "exit immediately if any command fails". | ||
| RUN set -e; \ | ||
| # Determine torch version | ||
| if [ ${#PYTORCH} -gt 0 ] && [ "$PYTORCH" != "pre" ]; then \ | ||
| VERSION="torch==${PYTORCH}.*"; \ | ||
| TORCHCODEC_VERSION="torchcodec==${TORCHCODEC}.*"; \ | ||
| else \ | ||
| VERSION="torch"; \ | ||
| TORCHCODEC_VERSION="torchcodec"; \ | ||
| fi; \ | ||
| \ | ||
| # Log the version being installed | ||
| echo "Installing torch version: $VERSION"; \ | ||
| \ | ||
| # Install PyTorch packages | ||
| if [ "$PYTORCH" != "pre" ]; then \ | ||
| python3 -m pip install --no-cache-dir -U \ | ||
| $VERSION \ | ||
| torchvision \ | ||
| torchaudio \ | ||
| --extra-index-url https://download.pytorch.org/whl/$CUDA; \ | ||
| # We need to specify the version if the torch version is not the latest stable one. | ||
| python3 -m pip install --no-cache-dir -U \ | ||
| $TORCHCODEC_VERSION --extra-index-url https://download.pytorch.org/whl/cpu; \ | ||
| else \ | ||
| python3 -m pip install --no-cache-dir -U --pre \ | ||
| torch \ | ||
| torchvision \ | ||
| torchaudio \ | ||
| --extra-index-url https://download.pytorch.org/whl/nightly/$CUDA; \ | ||
| python3 -m pip install --no-cache-dir -U --pre \ | ||
| torchcodec --extra-index-url https://download.pytorch.org/whl/nightly/cpu; \ | ||
| fi |
Collaborator
Author
There was a problem hiding this comment.
handle the torchcodec but also make it more readable
Collaborator
Author
|
I will try to check torch 2.9 + torchcodec 0.8 next week. At this moment, |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
0111729 to
996a539
Compare
0d80187 to
06fea6e
Compare
Collaborator
Author
|
Merge as discussed offline on slack |
i3hz
pushed a commit
to i3hz/transformers
that referenced
this pull request
Oct 30, 2025
* update * update * final check * final check * final clean --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
SangbumChoi
pushed a commit
to SangbumChoi/transformers
that referenced
this pull request
Jan 23, 2026
* update * update * final check * final check * final clean --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Mostly:
Make
docker/transformers-all-latest-gpu/Dockerfilemore readable and clean as we now need to handletorchcodec(usingcpu) along withtorch(cuda)Remove
push-cistuff. We are not paying any attention to it. We have something running on a very small subset now.Separate CI workflows and their docker images: with
flash-attnand without it