]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
bos #43318: fix used scikit-learn version for native node
authorGuytri KASTANE <guytri.kastane@cea.fr>
Tue, 22 Oct 2024 14:27:14 +0000 (16:27 +0200)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Tue, 22 Oct 2024 14:27:14 +0000 (16:27 +0200)
products/compil_scripts/openturns-1.23.sh

index ee9a1f9757fb06c129b6f514a4e4adb99a36a12d..d3c0572130dfa250c73375218a0d85dcc30e810f 100755 (executable)
@@ -354,17 +354,36 @@ if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then
                     exit 6
                 fi
             elif [ $k == "otpod" ]; then
-                if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" ]]; then
+                if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $SAT_Cython_IS_NATIVE == "1" ]]; then
                     echo "*** skipping: since system Cython too old"
                     continue
                 fi
+               if [ "${LINUX_DISTRIBUTION}" != "DB10" ]; then
                     echo "INFO: install scikit-learn-1.2.2"
-                    ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517
+                    if [ "${PYTHON_VERSION}" == "3.12" ]; then
+                        ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517
+                        if [ $? -ne 0 ]
+                        then
+                            echo "FATAL: could not install scikit-1.2.2"
+                            exit 6
+                        fi
+                   else
+                        ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp${PYTHON_VERSION//./}-cp${PYTHON_VERSION//./}-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps --prefix=$PRODUCT_INSTALL
+                   fi
                     if [ $? -ne 0 ]
                     then
                         echo "FATAL: could not install scikit-1.2.2"
                         exit 6
                     fi
+                else
+                    echo "INFO: install scikit-learn-1.0"
+                    ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.0/scikit-learn-1.0.tar.gz --no-deps --prefix=$PRODUCT_INSTALL --no-build-isolation --no-use-pep517
+                    if [ $? -ne 0 ]
+                    then
+                        echo "FATAL: could not install scikit-1.0"
+                        exit 6
+                    fi
+               fi
                 echo "INFO: install threadpoolctl-3.0.0"
                 ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip  $SOURCE_DIR/threadpoolctl-3.0.0/threadpoolctl-3.0.0-py3-none-any.whl --no-deps --prefix=$PRODUCT_INSTALL
                 if [ $? -ne 0 ]
@@ -439,11 +458,7 @@ if [[ -d "$SOURCE_DIR/otfftw-0.15" ]]; then
                     fi
                 elif [ "${PYTHON_VERSION}" == "3.9" ]; then
                     echo "INFO: install scikit-learn-1.2.2"
-                    if [ -n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
-                        ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip  $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps
-                    else
-                        ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip $SOURCE_DIR/scikit-learn-1.2.2/scikit-learn-1.2.2.tar.gz --no-deps
-                    fi
+                    ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip  $SOURCE_DIR/scikit-learn-1.2.2/scikit_learn-1.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --no-deps
                     if [ $? -ne 0 ]
                     then
                         echo "FATAL: could not install scikit-1.2.2"