| | FROM rocm/pytorch:rocm7.1_ubuntu22.04_py3.10_pytorch_release_2.8.0 |
| | LABEL maintainer="Hugging Face" |
| |
|
| | ARG DEBIAN_FRONTEND=noninteractive |
| |
|
| | RUN apt update && \ |
| | apt install -y --no-install-recommends git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-dev python3-pip python3-dev ffmpeg git-lfs && \ |
| | apt clean && \ |
| | rm -rf /var/lib/apt/lists/* |
| |
|
| | RUN git lfs install |
| |
|
| | RUN python3 -m pip install --no-cache-dir --upgrade pip numpy importlib-metadata setuptools wheel ninja pytesseract "itsdangerous<2.1.0" |
| | RUN python3 -m pip install --no-cache-dir --no-build-isolation git+https://github.com/facebookresearch/detectron2.git |
| |
|
| | ARG REF=main |
| | WORKDIR / |
| |
|
| | |
| | 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,audio] |
| |
|
| | |
| | |
| | RUN cd transformers && python3 setup.py develop |
| |
|
| | |
| | RUN python3 -m pip uninstall py3nvml pynvml nvidia-ml-py apex -y |
| |
|
| | |
| | RUN python3 -m pip uninstall -y kernels |
| |
|
| | |
| | RUN python3 -m pip install --no-cache-dir "torchcodec==0.7" |
| |
|
| | |
| | RUN git clone https://github.com/ROCm/flash-attention/ -b tridao && \ |
| | cd flash-attention && \ |
| | GPU_ARCHS="gfx942" python setup.py install |
| | |
| |
|
| | RUN python3 -m pip install --no-cache-dir einops |
| |
|