- A Linux OS, Ubuntu 16.04 recommended (Installation support for MacOS and Windows coming);
- Python3;
- Required Python Packages: numpy, scipy, cython;
- Recommended Python Packages (To run demos, generate plots, and render videos): matplotlib, jupyter, opencv3;
- Intel MKL (see below for instructions);
- C compiler (installation currently requires
icc, support forgcccoming);
This package contains C++ source code with Cython wrappers which need to be built on your system.
The easiest way to ensure all the required libraries are installed is to follow the instructions for installing & setting up Intel MKL (which is a free product for both personal and commercial applications).
Additionally, you will need a C++ compiler. For ease of implementation, the current installation scripts are setup for the Intel C Compiler icc (which is free for students and academics). Support to optionally use gcc (which is more commonly available by default) is coming.
Ensure that the neccessary dependencies are installed and that your the python environment you wish to install trefide into (we highly recommend using conda contained in the Anaconda & Miniconda disctributions to manage your python environments) is active.
- Clone the repository by navigating to the location you wish to install the package and executing
git clone git@github.com:ikinsella/trefide.git. The absolute path to the location mentioned above will be refered to as/path/to/install/directoryfor the remainder of these instructions. - Add the location of the C++ libraries to your shared library path by appending the lines
export TREFIDE="/path/to/install/directory/trefide"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TREFIDE/src"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TREFIDE/src/proxtv"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TREFIDE/src/glmgen/lib"
to your .bashrc file.
3. Compile the C++ source code by running
cd /path/to/install/directory/trefide/src
make
- Build the Cython wrappers and use pip to create an "editable" installation in your active python environment by running
cd /path/to/install/directory/trefide
LDSHARED="icc -shared" CC=icc CXX=icpc pip install -e /path/to/trefide
- Execute PMD demo code using the sample data here to ensure that the installation worked correctly.
If you modify or pull updates to any C++ &/or Cython code, the C++ &/or Cython code (respectively) will need to be rebuilt for changes to take effect. This can be done by running the following lines
- C++:
cd /path/to/install/directory/trefide/src make clean make - Cython:
cd /path/to/install/directory/trefide LDSHARED="icpc -shared" CXX=icpc CC=icc python setup.py build_ext --inplace
The project can be uninstalled from an active python environment at any time by running pip uninstall trefide. If you wish to remove the entire project (all of the files you cloned) from your system, you should also run rm -rf /path/to/install/directory/trefide.
- preprint
- support slack channel