Use torch 2.2 for daily CI (model tests) (#29208)
* Use torch 2.2 for daily CI (model tests) * update * update --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
12
.github/workflows/build-docker-images.yml
vendored
12
.github/workflows/build-docker-images.yml
vendored
@@ -20,18 +20,8 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
latest-docker:
|
latest-docker:
|
||||||
name: "Latest PyTorch + TensorFlow [dev]"
|
name: "Latest PyTorch + TensorFlow [dev]"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: [intel-cpu, 8-cpu, ci]
|
||||||
steps:
|
steps:
|
||||||
- name: Cleanup disk
|
|
||||||
run: |
|
|
||||||
sudo ls -l /usr/local/lib/
|
|
||||||
sudo ls -l /usr/share/
|
|
||||||
sudo du -sh /usr/local/lib/
|
|
||||||
sudo du -sh /usr/share/
|
|
||||||
sudo rm -rf /usr/local/lib/android
|
|
||||||
sudo rm -rf /usr/share/dotnet
|
|
||||||
sudo du -sh /usr/local/lib/
|
|
||||||
sudo du -sh /usr/share/
|
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ SHELL ["sh", "-lc"]
|
|||||||
# The following `ARG` are mainly used to specify the versions explicitly & directly in this docker file, and not meant
|
# The following `ARG` are mainly used to specify the versions explicitly & directly in this docker file, and not meant
|
||||||
# to be used as arguments for docker build (so far).
|
# to be used as arguments for docker build (so far).
|
||||||
|
|
||||||
ARG PYTORCH='2.1.1'
|
ARG PYTORCH='2.2.0'
|
||||||
# (not always a valid torch version)
|
# (not always a valid torch version)
|
||||||
ARG INTEL_TORCH_EXT='2.1.100'
|
ARG INTEL_TORCH_EXT='2.2.0'
|
||||||
# Example: `cu102`, `cu113`, etc.
|
# Example: `cu102`, `cu113`, etc.
|
||||||
ARG CUDA='cu118'
|
ARG CUDA='cu118'
|
||||||
|
|
||||||
@@ -23,6 +23,14 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip
|
|||||||
ARG REF=main
|
ARG REF=main
|
||||||
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
|
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
|
||||||
|
|
||||||
|
# During switch torch 2.2, we need to move (explicit) torch installation below but keep tf installation here.
|
||||||
|
# (otherwise we get `The runner has received a shutdown signal.` whose root cause is unknown but likely disk being full)
|
||||||
|
RUN python3 -m pip install --no-cache-dir -U tensorflow==2.13 protobuf==3.20.3 tensorflow_text tensorflow_probability
|
||||||
|
|
||||||
|
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev,onnxruntime]
|
||||||
|
|
||||||
|
# RUN python3 -m pip uninstall -y torch torchvision torchaudio && python3 -m pip install --no-cache-dir -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||||
|
|
||||||
# TODO: Handle these in a python utility script
|
# TODO: Handle these in a python utility script
|
||||||
RUN [ ${#PYTORCH} -gt 0 -a "$PYTORCH" != "pre" ] && VERSION='torch=='$PYTORCH'.*' || VERSION='torch'; echo "export VERSION='$VERSION'" >> ~/.profile
|
RUN [ ${#PYTORCH} -gt 0 -a "$PYTORCH" != "pre" ] && VERSION='torch=='$PYTORCH'.*' || VERSION='torch'; echo "export VERSION='$VERSION'" >> ~/.profile
|
||||||
RUN echo torch=$VERSION
|
RUN echo torch=$VERSION
|
||||||
@@ -31,10 +39,6 @@ RUN echo torch=$VERSION
|
|||||||
# TODO: We might need to specify proper versions that work with a specific torch version (especially for past CI).
|
# TODO: We might need to specify proper versions that work with a specific torch version (especially for past CI).
|
||||||
RUN [ "$PYTORCH" != "pre" ] && python3 -m pip install --no-cache-dir -U $VERSION torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/$CUDA || python3 -m pip install --no-cache-dir -U --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/$CUDA
|
RUN [ "$PYTORCH" != "pre" ] && python3 -m pip install --no-cache-dir -U $VERSION torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/$CUDA || python3 -m pip install --no-cache-dir -U --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/$CUDA
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir -U tensorflow==2.13 protobuf==3.20.3 tensorflow_text tensorflow_probability
|
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev,onnxruntime]
|
|
||||||
|
|
||||||
RUN python3 -m pip uninstall -y flax jax
|
RUN python3 -m pip uninstall -y flax jax
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir intel_extension_for_pytorch==$INTEL_TORCH_EXT -f https://developer.intel.com/ipex-whl-stable-cpu
|
RUN python3 -m pip install --no-cache-dir intel_extension_for_pytorch==$INTEL_TORCH_EXT -f https://developer.intel.com/ipex-whl-stable-cpu
|
||||||
@@ -46,22 +50,7 @@ RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/acc
|
|||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/peft@main#egg=peft
|
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/peft@main#egg=peft
|
||||||
|
|
||||||
# Add bitsandbytes for mixed int8 testing
|
# For bettertransformer
|
||||||
RUN python3 -m pip install --no-cache-dir bitsandbytes
|
|
||||||
|
|
||||||
# Add auto-gptq for gtpq quantization testing
|
|
||||||
RUN python3 -m pip install --no-cache-dir auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
|
|
||||||
|
|
||||||
# Add einops for additional model testing
|
|
||||||
RUN python3 -m pip install --no-cache-dir einops
|
|
||||||
|
|
||||||
# Add aqlm for quantization testing
|
|
||||||
RUN python3 -m pip install --no-cache-dir aqlm[gpu]==1.0.1
|
|
||||||
|
|
||||||
# Add autoawq for quantization testing
|
|
||||||
RUN python3 -m pip install --no-cache-dir https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.8/autoawq-0.1.8+cu118-cp38-cp38-linux_x86_64.whl
|
|
||||||
|
|
||||||
# For bettertransformer + gptq
|
|
||||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/optimum@main#egg=optimum
|
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/optimum@main#egg=optimum
|
||||||
|
|
||||||
# For video model testing
|
# For video model testing
|
||||||
|
|||||||
Reference in New Issue
Block a user