Skip to content

Update some workflow files#41892

Merged
ydshieh merged 5 commits intomainfrom
update_dockerfile
Oct 29, 2025
Merged

Update some workflow files#41892
ydshieh merged 5 commits intomainfrom
update_dockerfile

Conversation

@ydshieh
Copy link
Copy Markdown
Collaborator

@ydshieh ydshieh commented Oct 27, 2025

What does this PR do?

Mostly:

  • Make docker/transformers-all-latest-gpu/Dockerfile more readable and clean as we now need to handle torchcodec (using cpu) along with torch (cuda)

  • Remove push-ci stuff. 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-attn and without it

@ydshieh ydshieh requested a review from remi-or October 27, 2025 12:26
Comment on lines +16 to +17
# This needs to be compatible with the above `PYTORCH`.
ARG TORCHCODEC='0.7.0'
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle the torchcodec but also make it more readable

@ydshieh
Copy link
Copy Markdown
Collaborator Author

ydshieh commented Oct 27, 2025

I will try to check torch 2.9 + torchcodec 0.8 next week. At this moment, FA2 and detectorn2 fail to install with torch 2.9.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

@ydshieh
Copy link
Copy Markdown
Collaborator Author

ydshieh commented Oct 29, 2025

Merge as discussed offline on slack

@ydshieh ydshieh merged commit 10d5571 into main Oct 29, 2025
15 checks passed
@ydshieh ydshieh deleted the update_dockerfile branch October 29, 2025 13:42
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants