Fix missing hipblas/MIOpen dev packages in builder stage

Install hipblas-dev and miopen-hip-dev, and set CMAKE_PREFIX_PATH=/opt/rocm
so cmake can locate the hipblasConfig.cmake and MIOpen config files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 21:05:58 -04:00
parent b043494c74
commit d2aef1e7e0

View File

@@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git cmake cmake-curses-gui \ git cmake cmake-curses-gui \
libopenblas-dev wget \ libopenblas-dev wget \
python3-dev python3-pip \ python3-dev python3-pip \
hipblas-dev miopen-hip-dev \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Build oneDNN as a static library (CPU fallback / conv ops) # Build oneDNN as a static library (CPU fallback / conv ops)
@@ -41,6 +42,7 @@ RUN git clone --branch v4.0.0 --depth 1 \
git apply /tmp/ct2_4.0.0_rocm.patch && \ git apply /tmp/ct2_4.0.0_rocm.patch && \
mkdir build && cd build && \ mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=${CTRANSLATE2_ROOT} \ cmake -DCMAKE_INSTALL_PREFIX=${CTRANSLATE2_ROOT} \
-DCMAKE_PREFIX_PATH=/opt/rocm \
-DWITH_CUDA=ON \ -DWITH_CUDA=ON \
-DWITH_CUDNN=ON \ -DWITH_CUDNN=ON \
-DWITH_MKL=OFF \ -DWITH_MKL=OFF \