From 91ca40b7ea01f493fab02a2f0e6b8d22c8c3c329 Mon Sep 17 00:00:00 2001 From: Shang-Ching Liu Date: Fri, 12 Jul 2024 16:37:44 +0200 Subject: [PATCH 1/4] Change installation instruction on conda The previous failed due to the setup environment issue that force the system of cmake actually find the wrong eigen3 package in the environment. --- readme.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 0b4c2a64..a83475bc 100644 --- a/readme.md +++ b/readme.md @@ -96,7 +96,12 @@ conda activate foundationpose # Install Eigen3 3.4.0 under conda environment conda install conda-forge::eigen=3.4.0 -export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:/eigen/path/under/conda" + +# Setup the eigen3 path properly +setup_file="bundlesdf/mycuda/setup.py" +# Use sed to replace the include_dirs section +sed -i.bak '/include_dirs=\[/,/\],/c\ include_dirs=[\n "$CONDA_PREFIX/eigen3",\n ],' "$setup_file" +rm -f "${setup_file}.bak" # install dependencies python -m pip install -r requirements.txt From 25a410818d7af898434a30a6c9b3184ecaa50265 Mon Sep 17 00:00:00 2001 From: Shang-Ching Liu Date: Fri, 12 Jul 2024 18:35:37 +0200 Subject: [PATCH 2/4] Verification the setup on new machine Make sure using $CONDA_PREFIX for automatically ensure the correct path for eigen3 --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index a83475bc..88e8c321 100644 --- a/readme.md +++ b/readme.md @@ -100,7 +100,7 @@ conda install conda-forge::eigen=3.4.0 # Setup the eigen3 path properly setup_file="bundlesdf/mycuda/setup.py" # Use sed to replace the include_dirs section -sed -i.bak '/include_dirs=\[/,/\],/c\ include_dirs=[\n "$CONDA_PREFIX/eigen3",\n ],' "$setup_file" +sed -i.bak '/include_dirs=\[/,/\],/c\ include_dirs=[\n "'"$CONDA_PREFIX"'/include/eigen3",\n ],' "$setup_file" rm -f "${setup_file}.bak" # install dependencies From d8be2276a0330cdcc1e485e2a2580a26eff9f71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=89=E5=B0=9A=E9=9D=92?= Date: Sat, 13 Jul 2024 00:12:53 +0200 Subject: [PATCH 3/4] Merge it to one line --- readme.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 88e8c321..89cfb054 100644 --- a/readme.md +++ b/readme.md @@ -98,10 +98,7 @@ conda activate foundationpose conda install conda-forge::eigen=3.4.0 # Setup the eigen3 path properly -setup_file="bundlesdf/mycuda/setup.py" -# Use sed to replace the include_dirs section -sed -i.bak '/include_dirs=\[/,/\],/c\ include_dirs=[\n "'"$CONDA_PREFIX"'/include/eigen3",\n ],' "$setup_file" -rm -f "${setup_file}.bak" +sed -i '' "s#/usr/local/include/#$CONDA_PREFIX/include/#" bundlesdf/mycuda/setup.py # install dependencies python -m pip install -r requirements.txt From 2bf1d00976abf8e27b70d18d966812ed3ec3f8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=89=E5=B0=9A=E9=9D=92?= Date: Sat, 13 Jul 2024 11:35:01 +0200 Subject: [PATCH 4/4] Verification for Linux version --- readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 89cfb054..a43c14df 100644 --- a/readme.md +++ b/readme.md @@ -97,8 +97,9 @@ conda activate foundationpose # Install Eigen3 3.4.0 under conda environment conda install conda-forge::eigen=3.4.0 -# Setup the eigen3 path properly -sed -i '' "s#/usr/local/include/#$CONDA_PREFIX/include/#" bundlesdf/mycuda/setup.py +# Setup the eigen3 path properly +#sed -i '' "s#/usr/local/include/#$CONDA_PREFIX/include/#" bundlesdf/mycuda/setup.py (MacOS) +sed -i "s#/usr/local/include/#$CONDA_PREFIX/include/#" bundlesdf/mycuda/setup.py # Linux # install dependencies python -m pip install -r requirements.txt