Skip to content

Instantly share code, notes, and snippets.

@piyushrpt
Created February 20, 2024 21:43
Show Gist options
  • Save piyushrpt/545dc345aedb3bbfb9ab532355c56c6e to your computer and use it in GitHub Desktop.
Save piyushrpt/545dc345aedb3bbfb9ab532355c56c6e to your computer and use it in GitHub Desktop.
Installing isce3 with homebrew
  1. Create your own virtual env with a requirements.in file.

    • add h5py in requirements file to let it resolve but we will update it later
  2. Directory structure

parent
|
|-src/isce3
|-build
|-install
  1. Relevant cmake command for building on OSX 12.1 to be run in the build directory
> export py3exec={path_to_virtual_env}/bin/python3
> CC=clang CXX=clang++ CXXFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY" \
cmake -DPython_EXECUTABLE=$py3exec -DPYTHON_EXECUTABLE=$py3exec \
-DISCE3_FETCH_PYBIND11=NO -Dpybind11_DIR=/opt/homebrew/bin \
-DCMAKE_INSTALL_PREFIX=../install ../src/isce3

> make -j 8
> make install
  1. Env vars to set for use
DYLD_LIBRARY_PATH=DYLD_LIBRARY_PATH:$installdir/lib
PYTHONPATH=PYTHONPATH:$installdir/packages
  1. Fix h5py - make it match HDF5 exactly. From within the right virtualenv. This is needed for seamless interaction between h5py objects and ISCE3 C++ code.
python3 -m pip uninstall h5py
HDF_DIR=/opt/homebrew python3 -m pip install --no-binary=h5py h5py
  1. Test the installation from the build directory
> ctest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment