Fix builder image
Этот коммит содержится в:
@@ -1,42 +1,50 @@
|
||||
### Container di BUILD (non di runtime) per compilare RCCL dal monorepo UFFICIALE ROCm/rocm-systems (develop, projects/rccl) con lo script install.sh ufficiale, per un target GPU specifico, usando l'hipcc completo dell'immagine AMD Ryzen AI.
|
||||
### Il repo standalone ROCm/rccl e' disallineato (manca il campo forcePatEnable in comm.h, versione 2.26 vs i 2.30.4 del nostro torch): il monorepo rocm-systems e' la fonte corretta/aggiornata.
|
||||
### Il fork di kyuz0 (gfx1151-rccl) resta specifico solo per gfx1151 (assembly inline non portabile); qui usiamo il sorgente upstream: la issue ROCm/TheRock#844 (chiusa 2026-02-02) suggerisce che il supporto gfx1150 sia stato aggiunto a monte nel frattempo.
|
||||
### Container di BUILD (non di runtime) per compilare RCCL dal monorepo UFFICIALE ROCm/rocm-systems (develop, projects/rccl) con lo script install.sh ufficiale, usando il toolchain ufficiale TheRock (piu' aggiornato della vecchia immagine AMD Ryzen AI).
|
||||
### Base: immagine build manylinux di TheRock (AlmaLinux/RPM, non Ubuntu), con gcc-toolset-13/cmake/ninja/patchelf gia' pronti; il tarball ROCm ci aggiunge hipcc.
|
||||
### TheRock supporta ufficialmente sia gfx1150 che gfx1151 (RDNA3.5, vedi SUPPORTED_GPUS.md) dalla versione 10.1.0: si puo' quindi buildare UN SOLO librccl.so con kernel per entrambe le architetture insieme.
|
||||
###
|
||||
### BUILD per il worker (gfx1150):
|
||||
### podman build --pull=never --build-arg GPU_TARGET=gfx1150 -t vllm:amd-rccl-gfx1150 -f vllm-amd.Containerfile .
|
||||
### BUILD per il head (gfx1151, per confronto/verifica):
|
||||
### podman build --pull=never --build-arg GPU_TARGET=gfx1151 -t vllm:amd-rccl-gfx1151 -f vllm-amd.Containerfile .
|
||||
### BUILD (entrambi i target in un solo file, valido per head e worker):
|
||||
### podman build --pull=never -t vllm:amd-rccl -f vllm-amd.Containerfile .
|
||||
### BUILD per un solo target (es. se serve isolare un problema specifico):
|
||||
### podman build --pull=never --build-arg GPU_TARGETS=gfx1150 -t vllm:amd-rccl-gfx1150 -f vllm-amd.Containerfile .
|
||||
###
|
||||
### ESTRARRE IL FILE COMPILATO (es. per gfx1150):
|
||||
### id=$(podman create vllm:amd-rccl-gfx1150)
|
||||
### podman cp $id:/output/lib/librccl.so.1 ./librccl.so.1-gfx1150
|
||||
### ESTRARRE IL FILE COMPILATO:
|
||||
### id=$(podman create vllm:amd-rccl)
|
||||
### podman cp $id:/output/lib/librccl.so.1 ./librccl.so.1.0
|
||||
### podman rm $id
|
||||
|
||||
FROM oci-registry.ryai.dev/ryai-vllm:latest
|
||||
FROM ghcr.io/rocm/therock_build_manylinux_x86_64:latest
|
||||
|
||||
ARG GPU_TARGET=gfx1151
|
||||
ARG ROCM_VERSION=10.1.0
|
||||
ARG ROCM_AMDGPU_FAMILY=gfx110X-all
|
||||
ARG ROCM_RELEASE_TYPE=stable
|
||||
ARG GPU_TARGETS=gfx1150,gfx1151
|
||||
ARG RCCL_REPO=https://github.com/ROCm/rocm-systems.git
|
||||
ARG RCCL_BRANCH=develop
|
||||
|
||||
ENV ROCM_PATH=/opt/rocm
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y git cmake ninja-build build-essential libdrm-dev libnuma-dev pkg-config \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Pacchetti RPM mancanti nella base manylinux, necessari per RCCL (equivalenti di libdrm-dev/libnuma-dev/pkg-config su Ubuntu).
|
||||
RUN dnf install -y libdrm-devel numactl-devel pkgconfig \
|
||||
&& dnf clean all
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Script ufficiale TheRock per installare un tarball ROCm gia' pronto (include hipcc) per la famiglia GPU richiesta.
|
||||
RUN curl -fsSL -o install_rocm_tarball.sh https://raw.githubusercontent.com/ROCm/TheRock/main/dockerfiles/install_rocm_tarball.sh \
|
||||
&& chmod +x install_rocm_tarball.sh \
|
||||
&& ./install_rocm_tarball.sh "${ROCM_VERSION}" "${ROCM_AMDGPU_FAMILY}" "${ROCM_RELEASE_TYPE}" \
|
||||
&& rm -f install_rocm_tarball.sh
|
||||
|
||||
ENV ROCM_PATH=/opt/rocm
|
||||
ENV PATH=/opt/rocm/bin:$PATH
|
||||
|
||||
# Sparse checkout: il monorepo e' enorme, prendiamo solo projects/rccl.
|
||||
RUN git clone --depth 1 --branch "${RCCL_BRANCH}" --filter=blob:none --sparse "${RCCL_REPO}" rocm-systems \
|
||||
&& cd rocm-systems \
|
||||
&& git sparse-checkout set projects/rccl \
|
||||
&& git submodule update --init --recursive --depth=1 -- projects/rccl || true
|
||||
|
||||
# Script di build/install ufficiale del progetto, con target GPU esplicito.
|
||||
# Script di build/install ufficiale del progetto; con la virgola si possono passare piu' target GPU in un solo binario.
|
||||
RUN cd /build/rocm-systems/projects/rccl \
|
||||
&& ./install.sh -i --amdgpu_targets="${GPU_TARGET}" --prefix=/output -j "$(nproc)"
|
||||
&& ./install.sh -i --amdgpu_targets="${GPU_TARGETS}" --prefix=/output -j "$(nproc)"
|
||||
|
||||
RUN echo "--- Output ---" \
|
||||
&& find /output -iname 'librccl.so*' -exec ls -la {} \;
|
||||
|
||||
Ссылка в новой задаче
Block a user