-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [CI] Quantization workflow * build dockerfile * fix dockerfile * update self-cheduled.yml * test build dockerfile on push * fix torch install * udapte to python 3.10 * update aqlm version * uncomment build dockerfile * tests if the scheduler works * fix docker * do not trigger on psuh again * add additional runs * test again * all good * style * Update .github/workflows/self-scheduled.yml Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> * test build dockerfile with torch 2.2.0 * fix extra * clean * revert changes * Revert "revert changes" This reverts commit 4cb52b8. * revert correct change --------- Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
- Loading branch information
1 parent
566357d
commit 991e03c
Showing
5 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 | ||
LABEL maintainer="Hugging Face" | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Use login shell to read variables from `~/.profile` (to pass dynamic created variables between RUN commands) | ||
SHELL ["sh", "-lc"] | ||
|
||
# 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). | ||
|
||
ARG PYTORCH='2.2.0' | ||
# Example: `cu102`, `cu113`, etc. | ||
ARG CUDA='cu118' | ||
|
||
RUN apt update | ||
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python python3-pip ffmpeg | ||
RUN python3 -m pip install --no-cache-dir --upgrade pip | ||
|
||
ARG REF=main | ||
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF | ||
|
||
RUN [ ${#PYTORCH} -gt 0 ] && VERSION='torch=='$PYTORCH'.*' || VERSION='torch'; echo "export VERSION='$VERSION'" >> ~/.profile | ||
RUN echo torch=$VERSION | ||
# `torchvision` and `torchaudio` should be installed along with `torch`, especially for nightly build. | ||
# Currently, let's just use their latest releases (when `torch` is installed with a release version) | ||
RUN python3 -m pip install --no-cache-dir -U $VERSION torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/$CUDA | ||
|
||
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch] | ||
|
||
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate | ||
|
||
# Add bitsandbytes for mixed int8 testing | ||
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 optimum for gptq quantization testing | ||
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/optimum@main#egg=optimum | ||
|
||
# Add aqlm for quantization testing | ||
RUN python3 -m pip install --no-cache-dir aqlm[gpu]==1.0.2 | ||
|
||
# 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 | ||
|
||
# When installing in editable mode, `transformers` is not recognized as a package. | ||
# this line must be added in order for python to be aware of transformers. | ||
RUN cd transformers && python3 setup.py develop |
This file contains 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
This file contains 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