From e155af8704848d0d5de4e3f98d1fba3277553926 Mon Sep 17 00:00:00 2001 From: Aurelien Bouteiller Date: Fri, 31 Oct 2025 16:34:36 -0400 Subject: [PATCH] install_dependencies pip issues with ubuntu 24 (#302) * The install_dependencies script would fail on ubuntu 24.04 they changed how pip works so we need to create a venv first now * Fix install_dependencies for ubuntu 22 * Make sure we build in the builddir and install in the installdir combine installdir for ucx and ompi when user-provided by INSTALL_DIR retain prior behavior if not overridden to avoid breaking CI scripts --- scripts/install_dependencies.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index 54989e692c..095dc94f81 100755 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -32,17 +32,19 @@ if [[ -z "${_ROCM_DIR}" ]]; then fi # Location of dependencies source code -export _INSTALL_DIR=$BUILD_DIR/install -export _DEPS_SRC_DIR=$_INSTALL_DIR/src +_BUILD_DIR=${BUILD_DIR:-$PWD} +export _INSTALL_DIR=${INSTALL_DIR:-$_BUILD_DIR/install} +echo "rocSHMEM dependencies UCX and Open MPI will install in $_INSTALL_DIR" +export _DEPS_SRC_DIR=$_BUILD_DIR/deps-src mkdir -p $_DEPS_SRC_DIR #Adjust branches and installation location as necessary -export _UCX_INSTALL_DIR=$_INSTALL_DIR/ucx +export _UCX_INSTALL_DIR=${INSTALL_DIR:-$_INSTALL_DIR/ucx} export _UCX_REPO=https://github.com/ROCm/ucx.git export _UCX_COMMIT_HASH=18770fdc1c3b5de202d14a088a14b734d2c4bbf3 -export _OMPI_INSTALL_DIR=$_INSTALL_DIR/ompi +export _OMPI_INSTALL_DIR=${INSTALL_DIR:-$_INSTALL_DIR/ompi} export _OMPI_REPO=https://github.com/ROCm/ompi.git export _OMPI_COMMIT_HASH=697a596dde68815fe50db3c2a75a42ddb41b5ef4 @@ -70,7 +72,9 @@ git clone --recursive $_OMPI_REPO cd ompi git checkout $_OMPI_COMMIT_HASH git submodule update --init --recursive -pip install -r docs/requirements.txt +python3 -m venv --system-site-packages --without-pip venv +. venv/bin/activate +python3 -m pip install -r docs/requirements.txt ./autogen.pl ./configure --prefix=$_OMPI_INSTALL_DIR \ --with-rocm=$_ROCM_DIR \