From 018a434cc28f10f7066e169d97af3ee0c11f52a8 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Wed, 28 Jan 2026 00:03:34 -0600 Subject: [PATCH 1/9] Add build script and update build info Signed-off-by: Akash kaothalkar --- v/vllm/build_info.json | 11 +- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 256 +++++++++++++++++++++++++++++++++ 2 files changed, 263 insertions(+), 4 deletions(-) create mode 100644 v/vllm/vllm_v0.11.1_ubi_9.5.sh diff --git a/v/vllm/build_info.json b/v/vllm/build_info.json index b473124ef1..e930d8d0da 100644 --- a/v/vllm/build_info.json +++ b/v/vllm/build_info.json @@ -1,19 +1,22 @@ { - "maintainer": "ramnathnayak-ibm", + "maintainer": "akash-kaothalkar", "package_name": "vllm", "github_url": "https://github.com/vllm-project/vllm", - "version": "v0.10.0", + "version": "v0.11.1", "wheel_build" : true, "default_branch": "main", - "build_script": "vllm_v0.10.0_ubi_9.3.sh", + "build_script": "vllm_v0.11.1_ubi_9.5.sh", "package_dir": "v/vllm", "docker_build": false, "validate_build_script": true, "use_non_root_user": false, + "v0.11.1":{ + "build_script": "vllm_v0.11.1_ubi_9.5.sh" + }, "v0.10.0": { "build_script": "vllm_v0.10.0_ubi_9.3.sh" }, "*": { - "build_script": "vllm_ubi_9.3.sh" + "build_script": "vllm_v0.11.1_ubi_9.5.sh" } } diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh new file mode 100644 index 0000000000..c0787f2f58 --- /dev/null +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -0,0 +1,256 @@ +#!/bin/bash -e + +# ----------------------------------------------------------------------------- +# +# Package : vllm +# Version : v0.11.1 +# Source repo : https://github.com/vllm-project/vllm +# Tested on : UBI:9.5 +# Language : Python +# Ci-Check : +# Script License: Apache License 2.0 +# Maintainer : Akash Kaothalkar +# +# Disclaimer: This script has been tested in root mode on given +# ========== platform using the mentioned version of the package. +# It may not work as expected with newer versions of the +# package and/or distribution. In such case, please +# contact "Maintainer" of this script. +# +# ---------------------------------------------------------------------------- + + +set -o pipefail + +PACKAGE_NAME=vllm +PACKAGE_VERSION=${1:-v0.11.1} +PACKAGE_URL=https://github.com/vllm-project/vllm.git +CURRENT_DIR=$(pwd) +PACKAGE_DIR=vllm + +TORCH_VERSION=v2.8.0 +TORCHVISION_VERSION=v0.23.0 +TORCH_URL=https://github.com/pytorch/pytorch.git +TORCHVISION_URL=https://github.com/pytorch/vision.git + +export PYTHON=/usr/bin/python3.12 + +echo "===================================================================" +echo " vLLM FULL BUILD START (UBI 9.5 / POWER / v0.11.1)" +echo "===================================================================" + +# ----------------------------------------------------------------------------- +# System dependencies +# ----------------------------------------------------------------------------- +echo "-------------------- Installing OS dependencies -------------------" + +yum install -y \ + git wget tar gzip xz which procps-ng yum-utils \ + --allowerasing + +yum install -y \ + git make cmake gcc-toolset-13 \ + python3.12 python3.12-devel python3.12-pip \ + unzip zip wget patch \ + openssl-devel sqlite-devel \ + llvm-devel flex bison libevent-devel \ + freetype-devel gmp-devel numactl-devel libjpeg-turbo-devel \ + cargo libcurl-devel boost-devel \ + which procps-ng yum-utils \ + --allowerasing + +$PYTHON --version + +# ----------------------------------------------------------------------------- +# Enable GCC toolset (CRITICAL: must stay enabled for entire script) +# ----------------------------------------------------------------------------- +echo "-------------------- Enabling GCC toolset --------------------------" + +source /opt/rh/gcc-toolset-13/enable + +export CC=/opt/rh/gcc-toolset-13/root/usr/bin/gcc +export CXX=/opt/rh/gcc-toolset-13/root/usr/bin/g++ + +echo "CC = $CC" +echo "CXX = $CXX" +gcc --version +g++ --version + +# ----------------------------------------------------------------------------- +# Python tooling +# ----------------------------------------------------------------------------- +echo "-------------------- Upgrading Python tooling ---------------------" + +$PYTHON -m pip install --upgrade pip setuptools wheel + +# ----------------------------------------------------------------------------- +# Python binary wheels (POWER / devpi) +# ----------------------------------------------------------------------------- +echo "-------------------- Installing Python dependencies ----------------" + +$PYTHON -m pip install \ + --trusted-host wheels.developerfirst.ibm.com \ + "abseil-cpp @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/419/275773a4cc480/abseil_cpp-20240116.2-py3-none-any.whl" \ + "av @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/b09/d74303b7aaf7f/av-13.1.0-cp312-cp312-linux_ppc64le.whl" \ + "ffmpeg @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/25d/9b7b985a577b9/ffmpeg-7.1-py3-none-any.whl" \ + "lame @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/923/40f226ef59d45/lame-3.100-py3-none-any.whl" \ + "libprotobuf @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/e53/57a336598c208/libprotobuf-25.4-py3-none-manylinux2014_ppc64le.whl" \ + "libvpx @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/328/cfde06a744e3d/libvpx-1.13.1-py3-none-any.whl" \ + "llvmlite @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/ddd/ebf05d58bd563/llvmlite-0.44.0-cp312-cp312-linux_ppc64le.whl" \ + "numba @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/609/d7a83e5ac7944/numba-0.62.0.dev0-cp312-cp312-linux_ppc64le.whl" \ + "openblas @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/523/31f6718639cba/openblas-0.3.29-py3-none-manylinux2014_ppc64le.whl" \ + "opus @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/bec/40c21ed2fe31b/opus-1.3.1-py3-none-any.whl" \ + "protobuf @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/5e5/a6c4d93fcc5cd/protobuf-4.25.8-cp312-cp312-linux_ppc64le.whl" \ + "scipy @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/4e1/4b512f33efb85/scipy-1.16.0-cp312-cp312-linux_ppc64le.whl" \ + "sentencepiece @ https://wheels.developerfirst.ibm.com/ppc64le/linux/+f/161/51fddd15aec51/sentencepiece-0.2.0-cp312-cp312-linux_ppc64le.whl" \ + certifi charset-normalizer filelock fsspec idna \ + Jinja2 MarkupSafe mpmath networkx requests \ + sympy tqdm typing_extensions urllib3 numpy + +$PYTHON -m pip install cmake pyyaml packaging openpyxl setuptools_scm + +# ----------------------------------------------------------------------------- +# Pillow (devpi) +# ----------------------------------------------------------------------------- +echo "-------------------- Installing Pillow -----------------------------" + +$PYTHON -m pip install \ + --trusted-host wheels.developerfirst.ibm.com \ + --extra-index-url https://wheels.developerfirst.ibm.com/ppc64le/linux/+simple/ \ + pillow==11.2.1 + +# ----------------------------------------------------------------------------- +# Resolve OpenBLAS +# ----------------------------------------------------------------------------- +echo "-------------------- Resolving OpenBLAS ----------------------------" + +export OpenBLAS_HOME=/usr/local/lib/python3.12/site-packages/openblas +export OpenBLAS_DIR=${OpenBLAS_HOME} +export BLAS=OpenBLAS +export LD_LIBRARY_PATH=${OpenBLAS_HOME}/lib:${LD_LIBRARY_PATH} + + +# ----------------------------------------------------------------------------- +# Build PyArrow 21.0.0 from source +# ----------------------------------------------------------------------------- +echo "-------------------- Building PyArrow 21.0.0 -----------------------" + +export PYARROW_VERSION=21.0.0 + +git clone --recursive https://github.com/apache/arrow.git -b apache-arrow-${PYARROW_VERSION} +cd arrow/cpp + +mkdir -p build && cd build + +cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DARROW_PYTHON=ON \ + -DARROW_BUILD_TESTS=OFF \ + -DARROW_JEMALLOC=ON \ + -DARROW_BUILD_STATIC=OFF \ + -DARROW_PARQUET=ON \ + .. + +make -j$(nproc) +make install + +echo "/usr/local/lib" > /etc/ld.so.conf.d/arrow.conf +echo "/usr/local/lib64" >> /etc/ld.so.conf.d/arrow.conf +ldconfig + +cd ../../python + +pip install -r requirements-build.txt +export PYARROW_PARALLEL=$(nproc) + +$PYTHON setup.py build_ext \ + --build-type=release \ + --bundle-arrow-cpp \ + bdist_wheel \ + --dist-dir ./wheelhouse + +pip install wheelhouse/pyarrow-${PYARROW_VERSION}-*.whl + +cd ${CURRENT_DIR} + +# ----------------------------------------------------------------------------- +# Build PyTorch 2.8.0 +# ----------------------------------------------------------------------------- +echo "-------------------- Building PyTorch ${TORCH_VERSION} ------------------------" + +export USE_OPENMP=ON +export USE_MKLDNN=OFF +export USE_MKLDNN_CBLAS=OFF +export USE_CUDA=OFF +export CMAKE_PREFIX_PATH="${OpenBLAS_HOME}:${CMAKE_PREFIX_PATH}" + +git clone --recursive ${TORCH_URL} +cd pytorch +git checkout ${TORCH_VERSION} +git submodule update --init --recursive --jobs 1 + +$PYTHON -m pip install -r requirements.txt +$PYTHON setup.py build_ext -j$(nproc) +$PYTHON setup.py install + +cd ${CURRENT_DIR} + +# ----------------------------------------------------------------------------- +# Build TorchVision +# ----------------------------------------------------------------------------- +echo "-------------------- Building TorchVision --------------------------" + +git clone ${TORCHVISION_URL} +cd vision +git checkout ${TORCHVISION_VERSION} +USE_FFMPEG=1 USE_JPEG=1 USE_PNG=1 $PYTHON setup.py develop +cd ${CURRENT_DIR} + +# ----------------------------------------------------------------------------- +# Build vLLM +# ----------------------------------------------------------------------------- +echo "-------------------- Building vLLM ---------------------------------" + +git clone -b ${PACKAGE_VERSION} ${PACKAGE_URL} +cd ${PACKAGE_DIR} + +sed -i 's/^torch/# torch/' requirements/cpu.txt +sed -i 's/^torchvision/# torchvision/' requirements/cpu.txt +sed -i 's/^torchaudio/# torchaudio/' requirements/cpu.txt +sed -i 's/^outlines_core/# outlines_core/' requirements/common.txt + +$PYTHON -m pip install \ + --prefer-binary \ + --trusted-host wheels.developerfirst.ibm.com \ + --extra-index-url https://wheels.developerfirst.ibm.com/ppc64le/linux/+simple/ \ + -r requirements/cpu.txt + +$PYTHON -m pip install llguidance + +PIP_NO_BUILD_ISOLATION=1 \ +CC=${CC} \ +CXX=${CXX} \ +$PYTHON -m pip install xgrammar + +VLLM_TARGET_DEVICE=cpu \ +$PYTHON setup.py bdist_wheel --dist-dir="${CURRENT_DIR}" + +cd ${CURRENT_DIR} + +echo "===================================================================" +echo " vLLM WHEEL BUILT SUCCESSFULLY (v0.11.1)" +echo "===================================================================" +# After bdist_wheel +WHEEL_FILE=$(ls ${CURRENT_DIR}/vllm-*.whl | head -n1) + +python3.12 -m pip uninstall -y vllm || true +python3.12 -m pip install --force-reinstall "$WHEEL_FILE" + +if ! python3.12 ${PACKAGE_DIR}/examples/offline_inference/basic/basic.py; then + echo "------------------$PACKAGE_NAME:wheel_install_success_but_runtime_test_fails---------------------" + exit 2 +else + echo "------------------$PACKAGE_NAME:wheel_install_and_runtime_test_success-------------------------" + exit 0 +fi + From 768a45c539fb935f027c097ea137a271bbf11cc3 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Wed, 28 Jan 2026 01:16:36 -0600 Subject: [PATCH 2/9] fix build script Signed-off-by: Akash kaothalkar --- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh index c0787f2f58..a1c9389bf7 100644 --- a/v/vllm/vllm_v0.11.1_ubi_9.5.sh +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -20,7 +20,7 @@ # ---------------------------------------------------------------------------- -set -o pipefail +set -euo pipefail PACKAGE_NAME=vllm PACKAGE_VERSION=${1:-v0.11.1} @@ -128,7 +128,8 @@ export OpenBLAS_HOME=/usr/local/lib/python3.12/site-packages/openblas export OpenBLAS_DIR=${OpenBLAS_HOME} export BLAS=OpenBLAS export LD_LIBRARY_PATH=${OpenBLAS_HOME}/lib:${LD_LIBRARY_PATH} - +export PKG_CONFIG_PATH="${OpenBLAS_HOME}/lib/pkgconfig:${PKG_CONFIG_PATH}" +export LIBRARY_PATH="${OpenBLAS_HOME}/lib:${LIBRARY_PATH}" # ----------------------------------------------------------------------------- # Build PyArrow 21.0.0 from source @@ -218,6 +219,7 @@ sed -i 's/^torch/# torch/' requirements/cpu.txt sed -i 's/^torchvision/# torchvision/' requirements/cpu.txt sed -i 's/^torchaudio/# torchaudio/' requirements/cpu.txt sed -i 's/^outlines_core/# outlines_core/' requirements/common.txt +sed -i 's/^scipy/# scipy/' requirements/common.txt $PYTHON -m pip install \ --prefer-binary \ @@ -240,17 +242,4 @@ cd ${CURRENT_DIR} echo "===================================================================" echo " vLLM WHEEL BUILT SUCCESSFULLY (v0.11.1)" echo "===================================================================" -# After bdist_wheel -WHEEL_FILE=$(ls ${CURRENT_DIR}/vllm-*.whl | head -n1) - -python3.12 -m pip uninstall -y vllm || true -python3.12 -m pip install --force-reinstall "$WHEEL_FILE" - -if ! python3.12 ${PACKAGE_DIR}/examples/offline_inference/basic/basic.py; then - echo "------------------$PACKAGE_NAME:wheel_install_success_but_runtime_test_fails---------------------" - exit 2 -else - echo "------------------$PACKAGE_NAME:wheel_install_and_runtime_test_success-------------------------" - exit 0 -fi From e63be3377a5e4e5708a8c0570139665c71cfed43 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Wed, 28 Jan 2026 02:26:53 -0600 Subject: [PATCH 3/9] fix build_info default Signed-off-by: Akash kaothalkar --- v/vllm/build_info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v/vllm/build_info.json b/v/vllm/build_info.json index e930d8d0da..233e15cce5 100644 --- a/v/vllm/build_info.json +++ b/v/vllm/build_info.json @@ -17,6 +17,6 @@ "build_script": "vllm_v0.10.0_ubi_9.3.sh" }, "*": { - "build_script": "vllm_v0.11.1_ubi_9.5.sh" + "build_script": "vllm_ubi_9.3.sh" } } From 61761eadc5fcba9d8eb9292fb1f954d0087dff82 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Wed, 28 Jan 2026 02:47:00 -0600 Subject: [PATCH 4/9] fix flag Signed-off-by: Akash kaothalkar --- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh index a1c9389bf7..98718f238e 100644 --- a/v/vllm/vllm_v0.11.1_ubi_9.5.sh +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -20,7 +20,7 @@ # ---------------------------------------------------------------------------- -set -euo pipefail +set -eo pipefail PACKAGE_NAME=vllm PACKAGE_VERSION=${1:-v0.11.1} From cc30f74b821388f94a560e4589c0ca1b9fda89f6 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Thu, 29 Jan 2026 03:44:18 -0600 Subject: [PATCH 5/9] fix: Add install and test case Signed-off-by: Akash kaothalkar --- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh index 98718f238e..1b269466e2 100644 --- a/v/vllm/vllm_v0.11.1_ubi_9.5.sh +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -234,7 +234,11 @@ CC=${CC} \ CXX=${CXX} \ $PYTHON -m pip install xgrammar -VLLM_TARGET_DEVICE=cpu \ +export VLLM_TARGET_DEVICE=cpu +export MAX_JOBS=$(nproc) + +$PYTHON setup.py install + $PYTHON setup.py bdist_wheel --dist-dir="${CURRENT_DIR}" cd ${CURRENT_DIR} @@ -243,3 +247,21 @@ echo "===================================================================" echo " vLLM WHEEL BUILT SUCCESSFULLY (v0.11.1)" echo "===================================================================" + +# 4. Run the "Hello World" example +# Note: This attempts to download a small model (facebook/opt-125m) from HuggingFace. +# If the build machine is offline, this step will fail. +echo "Running basic offline inference example..." + +if ! $PYTHON ${PACKAGE_DIR}/examples/offline_inference/basic/basic.py; then + echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Install_success_but_test_Fails" + exit 2 +else + echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Pass | Both_Install_and_Test_Success" + exit 0 +fi + From f207921fa540e57742daac7d36e9b1fb27c6bc2b Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Fri, 30 Jan 2026 01:10:07 -0600 Subject: [PATCH 6/9] Set CI Check to True Signed-off-by: Akash kaothalkar --- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh index 1b269466e2..08f030a54b 100644 --- a/v/vllm/vllm_v0.11.1_ubi_9.5.sh +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -7,7 +7,7 @@ # Source repo : https://github.com/vllm-project/vllm # Tested on : UBI:9.5 # Language : Python -# Ci-Check : +# Ci-Check : True # Script License: Apache License 2.0 # Maintainer : Akash Kaothalkar # From 09ee6f30e35b3415135fe274fe0f0f0ee30e0d76 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Tue, 3 Feb 2026 23:34:59 -0600 Subject: [PATCH 7/9] fix CI failures Signed-off-by: Akash kaothalkar --- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh index 08f030a54b..c34c2efc5e 100644 --- a/v/vllm/vllm_v0.11.1_ubi_9.5.sh +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -44,6 +44,10 @@ echo "===================================================================" # ----------------------------------------------------------------------------- echo "-------------------- Installing OS dependencies -------------------" +echo ">>> Enabling CRB repository (required for build dependencies on POWER)" +yum install -y yum-utils +yum config-manager --set-enabled crb + yum install -y \ git wget tar gzip xz which procps-ng yum-utils \ --allowerasing From 42a18cd74cf11a32a0e2fe82f8bfc0ee6a523183 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Wed, 4 Feb 2026 01:21:14 -0600 Subject: [PATCH 8/9] fix CI failure Signed-off-by: Akash kaothalkar --- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh index c34c2efc5e..588a1cb47c 100644 --- a/v/vllm/vllm_v0.11.1_ubi_9.5.sh +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -46,7 +46,8 @@ echo "-------------------- Installing OS dependencies -------------------" echo ">>> Enabling CRB repository (required for build dependencies on POWER)" yum install -y yum-utils -yum config-manager --set-enabled crb +yum config-manager --set-enabled ubi-9-codeready-builder-rpms + yum install -y \ git wget tar gzip xz which procps-ng yum-utils \ From c7c8393940e7bdb197548eae09690d6ba4d94ee2 Mon Sep 17 00:00:00 2001 From: Akash kaothalkar Date: Fri, 6 Feb 2026 08:44:48 -0600 Subject: [PATCH 9/9] fix: remove rhel dependencies Signed-off-by: Akash kaothalkar --- v/vllm/vllm_v0.11.1_ubi_9.5.sh | 58 +++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/v/vllm/vllm_v0.11.1_ubi_9.5.sh b/v/vllm/vllm_v0.11.1_ubi_9.5.sh index 588a1cb47c..a045b4d508 100644 --- a/v/vllm/vllm_v0.11.1_ubi_9.5.sh +++ b/v/vllm/vllm_v0.11.1_ubi_9.5.sh @@ -44,7 +44,6 @@ echo "===================================================================" # ----------------------------------------------------------------------------- echo "-------------------- Installing OS dependencies -------------------" -echo ">>> Enabling CRB repository (required for build dependencies on POWER)" yum install -y yum-utils yum config-manager --set-enabled ubi-9-codeready-builder-rpms @@ -58,12 +57,28 @@ yum install -y \ python3.12 python3.12-devel python3.12-pip \ unzip zip wget patch \ openssl-devel sqlite-devel \ - llvm-devel flex bison libevent-devel \ - freetype-devel gmp-devel numactl-devel libjpeg-turbo-devel \ - cargo libcurl-devel boost-devel \ + llvm-devel libevent-devel \ + freetype-devel gmp-devel libjpeg-turbo-devel \ + cargo libcurl-devel \ which procps-ng yum-utils \ --allowerasing +# ----------------------------------------------------------------------------- +# Additional toolchain/runtime dependencies (POWER / UBI specific) +# ----------------------------------------------------------------------------- + +# libatomic required for Arrow + POWER +yum install -y gcc-toolset-13-libatomic-devel + +# Autotools required to build numactl from source on UBI +yum install -y \ + autoconf \ + automake \ + libtool \ + pkgconfig \ + make \ + gcc + $PYTHON --version # ----------------------------------------------------------------------------- @@ -73,6 +88,11 @@ echo "-------------------- Enabling GCC toolset --------------------------" source /opt/rh/gcc-toolset-13/enable +# Ensure gcc-toolset runtime libraries are visible +export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:${LD_LIBRARY_PATH} +export LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:${LIBRARY_PATH} +export CMAKE_PREFIX_PATH=/opt/rh/gcc-toolset-13/root/usr:${CMAKE_PREFIX_PATH} + export CC=/opt/rh/gcc-toolset-13/root/usr/bin/gcc export CXX=/opt/rh/gcc-toolset-13/root/usr/bin/g++ @@ -212,6 +232,35 @@ git checkout ${TORCHVISION_VERSION} USE_FFMPEG=1 USE_JPEG=1 USE_PNG=1 $PYTHON setup.py develop cd ${CURRENT_DIR} +# ----------------------------------------------------------------------------- +# Build numactl from source (UBI does not ship numactl-devel) +# ----------------------------------------------------------------------------- + +echo "-------------------- Building numactl from source ------------------" + +cd ${CURRENT_DIR} + +git clone https://github.com/numactl/numactl +cd numactl +git checkout v2.0.19 + +./autogen.sh +./configure --prefix=/usr/local +make -j$(nproc) +make install + +# Register numactl libraries +echo "/usr/local/lib" > /etc/ld.so.conf.d/numactl.conf +ldconfig + +# Ensure headers and libs are visible to subsequent builds +export CPLUS_INCLUDE_PATH=/usr/local/include:${CPLUS_INCLUDE_PATH} +export LIBRARY_PATH=/usr/local/lib:${LIBRARY_PATH} +export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH} +export CMAKE_PREFIX_PATH=/usr/local:${CMAKE_PREFIX_PATH} + +cd ${CURRENT_DIR} + # ----------------------------------------------------------------------------- # Build vLLM # ----------------------------------------------------------------------------- @@ -269,4 +318,3 @@ else echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Pass | Both_Install_and_Test_Success" exit 0 fi -