Skip to content

Installation

Tzu-Mao Li edited this page Jul 28, 2019 · 25 revisions

Redner is expected to be used together with PyTorch. Most of the code is written in C++, and we use pybind11 to interface with Python. To install redner, you need to first install CMake and Miniconda (optional but recommended). Redner is tested under gcc 7 and clang 7 in Mac OS and Linux. There is a preliminary support for windows, see https://github.com/BachiLi/redner/pull/11.

Next, install pybind11, PyTorch, numpy, scikit-image using conda:

conda install pybind11
conda install pytorch -c pytorch
conda install numpy
conda install scikit-image

Redner has both CPU and GPU backends. If you want to use the GPU backend, you need to download and install CUDA 10 and optix.

Now you can clone the redner repository and all the submodules:

git clone --recursive https://github.com/BachiLi/redner.git

Next, use CMake to generate makefiles. You may need to provide cmake the following variables for it to find the dependencies:

Python_INCLUDE_DIRS
Python_LIBRARIES
EMBREE_INCLUDE_PATH
EMBREE_LIBRARY
OptiX_INCLUDE
CUDA_LIBRARIES
THRUST_INCLUDE_DIR
optix_prime_LIBRARY
CUDA_curand_LIBRARY

I recommend using ccmake to configure:

mkdir build
cd build
ccmake ..
make install -j 8

Now you are ready to begin the tutorial.