From 261fa75e0641f711dffb56b65201e8cb6128a4e6 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 00:23:02 +0200 Subject: [PATCH 1/9] increase otsu steep --- package/PartSegCore/segmentation/watershed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/PartSegCore/segmentation/watershed.py b/package/PartSegCore/segmentation/watershed.py index 4ad3bc245..c6bb3cc7c 100644 --- a/package/PartSegCore/segmentation/watershed.py +++ b/package/PartSegCore/segmentation/watershed.py @@ -183,7 +183,7 @@ def sprawl( class MSOWatershedParams(BaseModel): - step_limits: int = Field(100, ge=1, le=1000, title="Steep limits", description="Limits of Steps") + step_limits: int = Field(100, ge=1, le=10000, title="Steep limits", description="Limits of Steps") reflective: bool = False From 51adaa6a171a2a3a00cf226bb11b216cfbfe2d97 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 00:26:49 +0200 Subject: [PATCH 2/9] install PartSegCore-compiled-backend from source --- .azure-pipelines/pyinstaller.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.azure-pipelines/pyinstaller.yaml b/.azure-pipelines/pyinstaller.yaml index 4bb2251bc..5ca4fcbe5 100644 --- a/.azure-pipelines/pyinstaller.yaml +++ b/.azure-pipelines/pyinstaller.yaml @@ -15,6 +15,10 @@ steps: displayName: install libs - bash: python -m pip install .[pyinstaller] -c requirements/constraints_py3.12.txt displayName: install partseg + - bash: | + python -m pip install git+https://github.com/4DNucleome/PartSegCore-compiled-backend.git@mso_fix + displayName: install PartSegCore-compiled-backend from `mso_fix` branch + # https://github.com/4DNucleome/PartSegCore-compiled-backend/tree/mso_fix - bash: | python build_utils/create_and_pack_executable.py --no-simple-zip displayName: build From f959fbc9f50139cacb08859e89f27400c2134e8a Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 00:48:05 +0200 Subject: [PATCH 3/9] trigger ci From 67b82c5b23016fdad67d14e2e5c124bf116e5d07 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 08:54:01 +0200 Subject: [PATCH 4/9] trigger ci From 3ef7399349ac675a92a26c03360e0aeb3d5f4462 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 09:08:10 +0200 Subject: [PATCH 5/9] trigger ci From a4c378151a0c7c163f5e741c8146793d3ef234f3 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 09:18:51 +0200 Subject: [PATCH 6/9] add building libomp --- .azure-pipelines/pyinstaller.yaml | 3 +++ build_utils/build_libomp.sh | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 build_utils/build_libomp.sh diff --git a/.azure-pipelines/pyinstaller.yaml b/.azure-pipelines/pyinstaller.yaml index 5ca4fcbe5..03edb2d81 100644 --- a/.azure-pipelines/pyinstaller.yaml +++ b/.azure-pipelines/pyinstaller.yaml @@ -15,6 +15,9 @@ steps: displayName: install libs - bash: python -m pip install .[pyinstaller] -c requirements/constraints_py3.12.txt displayName: install partseg + - bash: | + bash build_utils/build_libomp.sh + displayName: install libomp - bash: | python -m pip install git+https://github.com/4DNucleome/PartSegCore-compiled-backend.git@mso_fix displayName: install PartSegCore-compiled-backend from `mso_fix` branch diff --git a/build_utils/build_libomp.sh b/build_utils/build_libomp.sh new file mode 100644 index 000000000..fd2579778 --- /dev/null +++ b/build_utils/build_libomp.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +build_dir=${DIR}/libs_build +LLVM_VERSION=${LLVM_VERSION:-19.1.1} +INSTALL_CMD=${INSTALL_CMD:-"sudo make install"} + +echo MACOSX_DEPLOYMENT_TARGET $MACOSX_DEPLOYMENT_TARGET + +git clone --depth 1 --branch llvmorg-${LLVM_VERSION} https://github.com/llvm/llvm-project +pushd llvm-project/openmp +mkdir build +cd build +cmake -DCMAKE_C_COMPILER=${CC:-clang} -DCMAKE_CXX_COMPILER=${CXX:-clang++} ${CMAKE_FLAGS:-} .. +make ${MAKE_FLAGS:-} +${INSTALL_CMD} + +popd +rm -rf llvm-project From 4a78def86857663623e63fa58fd2e1e65720a89d Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 09:45:47 +0200 Subject: [PATCH 7/9] add MACOSX_DEPLOYMENT_TARGET --- .azure-pipelines/pyinstaller.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/pyinstaller.yaml b/.azure-pipelines/pyinstaller.yaml index 03edb2d81..ffbe22536 100644 --- a/.azure-pipelines/pyinstaller.yaml +++ b/.azure-pipelines/pyinstaller.yaml @@ -18,6 +18,8 @@ steps: - bash: | bash build_utils/build_libomp.sh displayName: install libomp + env: + MACOSX_DEPLOYMENT_TARGET: 10.15 - bash: | python -m pip install git+https://github.com/4DNucleome/PartSegCore-compiled-backend.git@mso_fix displayName: install PartSegCore-compiled-backend from `mso_fix` branch From ff7e2a8fbe87aadab5623d8fac4ca18a37459875 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 10:18:55 +0200 Subject: [PATCH 8/9] try build libomp only on macos --- .azure-pipelines/pyinstaller.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/pyinstaller.yaml b/.azure-pipelines/pyinstaller.yaml index ffbe22536..af0268c0e 100644 --- a/.azure-pipelines/pyinstaller.yaml +++ b/.azure-pipelines/pyinstaller.yaml @@ -17,6 +17,7 @@ steps: displayName: install partseg - bash: | bash build_utils/build_libomp.sh + if: startsWith(variables['Agent.OS'], 'Darwin') displayName: install libomp env: MACOSX_DEPLOYMENT_TARGET: 10.15 From fad334f26d99027641e77910689430903f968bdb Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Fri, 25 Oct 2024 10:32:46 +0200 Subject: [PATCH 9/9] use `condition` in place of `if` --- .azure-pipelines/pyinstaller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/pyinstaller.yaml b/.azure-pipelines/pyinstaller.yaml index af0268c0e..39d8ee8a6 100644 --- a/.azure-pipelines/pyinstaller.yaml +++ b/.azure-pipelines/pyinstaller.yaml @@ -17,7 +17,7 @@ steps: displayName: install partseg - bash: | bash build_utils/build_libomp.sh - if: startsWith(variables['Agent.OS'], 'Darwin') + condition: startsWith(variables['Agent.OS'], 'Darwin') displayName: install libomp env: MACOSX_DEPLOYMENT_TARGET: 10.15