Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Past CI #17919

Merged
merged 7 commits into from
Jul 5, 2022
Merged

Enable Past CI #17919

merged 7 commits into from
Jul 5, 2022

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jun 28, 2022

What does this PR do?

Enable Past CI

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 28, 2022

The documentation is not available anymore as the PR was closed or merged.

@ydshieh ydshieh marked this pull request as draft June 28, 2022 10:04
@ydshieh ydshieh marked this pull request as ready for review July 1, 2022 09:25
@@ -0,0 +1,51 @@
ARG BASE_DOCKER_IMAGE="nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will remove some commented blocks before merge - the installations which won't be included.

### RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
RUN python3 -m pip install -U "itsdangerous<2.1.0"

### RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no accelerate

### RUN python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$(python3 -c "from torch import version; print(version.__version__.split('+')[0])")+$CUDA.html
### RUN python3 -m pip install --no-cache-dir intel_extension_for_pytorch==$INTEL_TORCH_EXT+cpu -f https://software.intel.com/ipex-whl-stable

### RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not to include those 3rd party libs

### RUN python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$(python3 -c "from torch import version; print(version.__version__.split('+')[0])")+$CUDA.html
### RUN python3 -m pip install --no-cache-dir intel_extension_for_pytorch==$INTEL_TORCH_EXT+cpu -f https://software.intel.com/ipex-whl-stable

### RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not to include those 3rd party libs

@@ -0,0 +1,116 @@
import argparse
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file is to make the installation commands easier to read in Docker files.
This should be used for other Docker files once this PR is merged.

For example, the following block hurts my head a bit already 😄

RUN [ ${#PYTORCH} -gt 0 ] && VERSION='torch=='$PYTORCH'.*' || VERSION='torch'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/cu113
RUN [ ${#TORCH_VISION} -gt 0 ] && VERSION='torchvision=='TORCH_VISION'.*' || VERSION='torchvision'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/cu113
RUN [ ${#TORCH_AUDIO} -gt 0 ] && VERSION='torchaudio=='TORCH_AUDIO'.*' || VERSION='torchaudio'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/cu113

"torch": "1.10.2",
"torchvision": "0.11.3",
"torchaudio": "0.10.2",
"python": 3.9,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the highest python version for that PyTorch version. Not really important

@ydshieh ydshieh requested a review from LysandreJik July 1, 2022 09:41
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

This is great, super impressive! Let's merge it when you're happy with it and monitor failures. Please open an issue with the first reports when they're here so that we may discuss there which versions we'd like to keep or not.

Comment on lines 85 to 94
# need python 3.7
# "1.3": {
# "torch": "1.3.1",
# "torchvision": "0.4.2",
# "torchaudio": None,
# "python": 3.7,
# "cuda": "cu100",
# "docker-base": "10.0-cudnn7-devel-ubuntu18.04",
# "install": "python3 -m pip install --no-cache-dir -U torch==1.3.1 torchvision==0.4.2 torchaudio==0.4.0 --extra-index-url https://download.pytorch.org/whl/cu100",
# },
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove it then

# "install": "python3 -m pip install --no-cache-dir -U torch==1.3.1 torchvision==0.4.2 torchaudio==0.4.0 --extra-index-url https://download.pytorch.org/whl/cu100",
# },
},
# Should we include `tensorflow_probability`?
Copy link
Member

Choose a reason for hiding this comment

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

Let's do without it as a first step, let's start simple

Comment on lines 120 to 123
# "2.3": {
# "tensorflow": "2.3.4",
# "install": "python3 -m pip install --no-cache-dir -U tensorflow==2.3.4",
# },
Copy link
Member

Choose a reason for hiding this comment

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

This one isn't available either in the python version ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TF 2.3 requires CUDA 10.1 / cudnn 7.6, for which I don't find a good docker image on nvidia/.

(There is one for Ubuntu 18.04, but I remembered I have some trouble with it. I can re-run docker build to see what goes wrong)

Copy link
Collaborator Author

@ydshieh ydshieh Jul 5, 2022

Choose a reason for hiding this comment

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

Hi @LysandreJik . I remember what's wrong 😄

The best image I could find is nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04, which has Python 3.6. During build, I got errors like

ERROR: No matching distribution found for accelerate>=0.10.0; extra == "dev"

Also, we have python": "python>=3.7.0 in setup.py.

As we discussed shortly before, I could try to build an image from scratch with python >= 3.7 with the necessary cuda/cudnn. I didn't do that though but just tried to launch the Past-CI with those versions easier to deal with.

I will merge this PR first, and if we would like to give a stab on TF 2.3, I can make it.

Copy link
Member

Choose a reason for hiding this comment

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

Let's merge it like this and ask the TF crew if they think 2.3 should be supported before putting too much efforts into it :)

@ydshieh ydshieh merged commit f681437 into main Jul 5, 2022
@ydshieh ydshieh deleted the past-ci branch July 5, 2022 16:08
@ydshieh
Copy link
Collaborator Author

ydshieh commented Jul 18, 2022

merge it ... and monitor failures.

I read your comment too quickly. So far the Past CI will be triggered only on pushing to run-past-ci* branches. I ran it ~ June 20 however, and I opened #18181 today.

I think we can launch past CI monthly or even bimonthly. Please let me know if you have different opinion, @LysandreJik. Thanks.

viclzhu pushed a commit to viclzhu/transformers that referenced this pull request Jul 18, 2022
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.

None yet

3 participants