|
|
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
|
|
|
LABEL maintainer="Hugging Face"
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
|
SHELL ["sh", "-lc"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARG PYTORCH='2.5.1'
|
|
|
|
|
|
ARG CUDA='cu118'
|
|
|
|
|
|
RUN apt update
|
|
|
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 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
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir einops
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir bitsandbytes
|
|
|
|
|
|
|
|
|
|
|
|
RUN pip install gekko
|
|
|
RUN git clone https://github.com/PanQiWei/AutoGPTQ.git && cd AutoGPTQ && TORCH_CUDA_ARCH_LIST="7.5+PTX" python3 setup.py install
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/optimum@main
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/peft@main
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir aqlm[gpu]==1.0.2
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir vptq
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir spqr_quant[gpu]
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir hqq
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir gguf
|
|
|
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.7.post2/autoawq-0.2.7.post2-py3-none-any.whl
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir optimum-quanto
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install git+https://github.com/NetEase-FuXi/EETQ.git
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir flute-kernel==0.3.0 -i https://flute-ai.github.io/whl/cu118
|
|
|
RUN python3 -m pip install --no-cache-dir fast_hadamard_transform==1.0.4.post1
|
|
|
|
|
|
|
|
|
RUN python3 -m pip install --no-cache-dir compressed-tensors
|
|
|
|
|
|
|
|
|
|
|
|
RUN cd transformers && python3 setup.py develop
|
|
|
|