mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 04:40:06 +06:00

* add deepspeed scheduled test for amd * fix image * add dockerfile * add comment * enable tests * trigger * remove trigger for this branch * trigger * change runner env to trigger the docker build image test * use new docker image * remove test suffix from docker image tag * replace test docker image with original image * push new image * Trigger * add back amd tests * fix typo * add amd tests back * fix * comment until docker image build scheduled test fix * remove deprecated deepspeed build option * upgrade torch * update docker & make tests pass * Update docker/transformers-pytorch-deepspeed-amd-gpu/Dockerfile * fix * tmp disable test * precompile deepspeed to avoid timeout during tests * fix comment * trigger deepspeed tests with new image * comment tests * trigger * add sklearn dependency to fix slow tests * enable back other tests * final update --------- Co-authored-by: Felix Marty <felix@hf.co> Co-authored-by: Félix Marty <9808326+fxmarty@users.noreply.github.com> Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
37 lines
1.4 KiB
Docker
37 lines
1.4 KiB
Docker
FROM rocm/dev-ubuntu-20.04:5.6
|
|
# rocm/pytorch has no version with 2.1.0
|
|
LABEL maintainer="Hugging Face"
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
ARG PYTORCH='2.1.0'
|
|
ARG TORCH_VISION='0.16.0'
|
|
ARG TORCH_AUDIO='2.1.0'
|
|
ARG ROCM='5.6'
|
|
|
|
RUN apt update && \
|
|
apt install -y --no-install-recommends git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-dev python3-pip ffmpeg && \
|
|
apt clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN python3 -m pip install --no-cache-dir --upgrade pip
|
|
|
|
RUN python3 -m pip install torch==$PYTORCH torchvision==$TORCH_VISION torchaudio==$TORCH_AUDIO --index-url https://download.pytorch.org/whl/rocm$ROCM
|
|
|
|
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools ninja git+https://github.com/facebookresearch/detectron2.git pytesseract "itsdangerous<2.1.0"
|
|
|
|
ARG REF=main
|
|
WORKDIR /
|
|
|
|
# Invalidate docker cache from here if new commit is available.
|
|
ADD https://api.github.com/repos/huggingface/transformers/git/refs/heads/main version.json
|
|
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
|
|
|
|
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video]
|
|
|
|
RUN python3 -m pip uninstall -y tensorflow flax
|
|
|
|
# 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
|