Follow one of:
- https://github.com/AcademySoftwareFoundation/openvdb#linux
- https://github.com/AcademySoftwareFoundation/openvdb#macos
Just make sure to call the cmake command with -DOPENVDB_BUILD_PYTHON_MODULE=ON -DUSE_NUMPY=ON
mamba create -n openvdb -c conda-forge openvdb
mamba activate openvdb
python -c 'import pyopenvdb'
Load dependencies
module load gcc/12.2.0 cmake/3.24.2 boost/1.80.0 python3/3.11.0 python3-as-python intel-tbb/2021.10.0
Note: numpy
is available in the python3/3.11.0
module.
Create a virtual environment and activate it
python -m venv --system-site-packages venv
source venv/bin/activate
Install pybind11 from PyPI
pip install --upgrade pip wheel pybind11
Clone OpenVDB
git clone https://github.com/AcademySoftwareFoundation/openvdb.git
Make a build directory
cd openvdb
mkdir build
Run CMake: configure, build, and install
cmake .. -DOPENVDB_BUILD_PYTHON_MODULE=ON -DUSE_NUMPY=ON -DOPENVDB_CORE_STATIC=OFF -DUSE_EXPLICIT_INSTANTIATION=OFF -DCMAKE_INSTALL_PREFIX=$HOME/venv/ -DBOOST_LIBRARYDIR=$BOOST_LIBRARYDIR/GNU/ -DBoost_NO_BOOST_CMAKE=ON -Dpybind11_ROOT=$(pybind11-config --cmakedir)
make -j
make install
Note: boost and pybind11 are a bit tricky on Gadi.
CMake was having issues with the Boost module, so we manually specify its install path.
We also have to manually specify the installation of pybind11
since it was installed via pip and so cmake has no way of finding it.
Now you can import pyopenvdb
in a python interpreter, as long as you have activated that venv.
i.e. on a future login
module load gcc/12.2.0 cmake/3.24.2 boost/1.80.0 python3/3.11.0 python3-as-python intel-tbb/2021.10.0
source $HOME/venv/bin/activate
python -c 'import pyopenvdb'
Load dependencies
module load gompi/2022a cmake/3.24.3 tbb/2021.5.0 boost/1.79.0 pybind11/2.9.2 blosc/1.21.3 numpy/1.22.3-scipy-bundle-2022.05
Note that blosc
is not present in the OS, unlike on Gadi, so we have to load it. Also, pybind11
is available as a module, and we need to load numpy
.
Create a virtual environment and activate it
python -m venv --system-site-packages venv
source venv/bin/activate
Clone OpenVDB
git clone https://github.com/AcademySoftwareFoundation/openvdb.git
Make a build directory
cd openvdb
mkdir build
Run CMake: configure, build, and install
cmake .. -DOPENVDB_BUILD_PYTHON_MODULE=ON -DUSE_NUMPY=ON -DOPENVDB_CORE_STATIC=OFF -DUSE_EXPLICIT_INSTANTIATION=OFF -DCMAKE_INSTALL_PREFIX=$HOME/venv/
make -j
make install
On future logins do
module load gompi/2022a cmake/3.24.3 tbb/2021.5.0 boost/1.79.0 pybind11/2.9.2 blosc/1.21.3 numpy/1.22.3-scipy-bundle-2022.05
source $HOME/bin/activate
python -c 'import pyopenvdb'