@@ -59,7 +59,7 @@ RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
5959 cargo build --release --bin text-embeddings-router -F grpc -F python --no-default-features && sccache -s
6060
6161# ── ROCm Python runtime ───────────────────────────────────────────────────────
62- FROM rocm/pytorch:rocm7.1_ubuntu22. 04_py3.10_pytorch_release_2.8 .0 AS rocm
62+ FROM rocm/pytorch:rocm7.2.2_ubuntu22. 04_py3.10_pytorch_release_2.10 .0 AS rocm
6363
6464LABEL maintainer="Hugging Face"
6565
@@ -69,21 +69,14 @@ ENV HUGGINGFACE_HUB_CACHE=/data \
6969RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
7070 build-essential \
7171 git \
72- cmake \
73- ninja-build \
7472 python3-dev \
7573 && rm -rf /var/lib/apt/lists/*
7674
77- # Install flash-attention from the ROCm fork.
78- # Pinned to a specific commit to stay within the CI 6h build time limit.
79- # GPU_ARCHS: gfx942 = MI300X / MI300A.
80- # Add gfx90a for MI200 series, gfx908 for MI100.
81- ARG GPU_ARCHS="gfx942"
82- RUN git clone https://github.com/ROCm/flash-attention/ -b tridao && \
83- cd flash-attention && \
84- git checkout 6387433156558135a998d5568a9d74c1778666d8 && \
85- GPU_ARCHS="${GPU_ARCHS}" python setup.py install && \
86- cd .. && rm -rf flash-attention
75+ # Install flash-attention from AMD's prebuilt ROCm wheels (no source build).
76+ # The wheel is built for gfx942 (MI300X / MI300A) and gfx950 (MI350) and is
77+ # pinned to match the ROCm / Python / PyTorch ABI of the base image.
78+ ARG FLASH_ATTN_WHEEL="https://rocm.frameworks-devreleases.amd.com/whl/gfx942-gfx950/flash_attn-2.8.3-cp310-cp310-linux_x86_64.whl"
79+ RUN python3 -m pip install --no-cache-dir "${FLASH_ATTN_WHEEL}"
8780
8881WORKDIR /usr/src
8982COPY backends backends
0 commit comments