Build & Install¶
Build dependencies¶
Compilation dependencies
Runtime dependencies:
eckit — ECMWF C++ toolkit
Optional runtime dependencies:
Installation scripts¶
Utility installation scripts are provided in the /dev directory and can be used for default installation of Infero.
env.sh : defines installation environment
1_install_deps.sh : installs dependencies
2_install_infero.sh : installs Infero
Installation environment can also be customised by editing the following variables in the env.sh script:
Variable |
Description |
Default |
---|---|---|
INFERO_VERBOSE_COMPILATION |
Verbose flag |
0 |
ROOT_DIR |
Infero root path |
${HOME} |
ROOT_SRC_DIR |
Sources root path |
${ROOT_DIR}/local |
ROOT_BUILD_DIR |
build root path |
${ROOT_DIR}/builds |
ROOT_INSTALL_DIR |
install root path |
${ROOT_DIR}/installs |
WITH_FORTRAN |
Use FCKIT (Fortran API) |
ON |
WITH_ONNX_RUNTIME |
ONNX runtime |
ON |
WITH_TFC_RUNTIME |
Tensorflow C-API |
ON |
TFC_GPU |
TEnsorflow C-API (GPU) |
1 |
WITH_TFLITE_RUNTIME |
TensorFlow TFlite |
OFF |
WITH_TRT |
TensorRT |
OFF |
ENABLE_TESTS |
Build Infero tests |
ON |
BUILD_NPROCS |
Num procs for building |
8 |
Manual Installation¶
This installation procedure gives more control on the building/installation process. Infero employs an out-of-source build/install based on CMake. To manually invoke cmake, make sure that ecbuild is installed and the ecbuild executable script is found.
which ecbuild
Now proceed with installation as follows:
# Environment --- Edit as needed
srcdir=$(pwd)
builddir=build
installdir=$HOME/local
Create the build directory:
mkdir $builddir
cd $builddir
Run CMake:
ecbuild --prefix=$installdir -- -DECKIT_PATH=<path/to/eckit/install> $srcdir
Compile and Install:
make -j10
make install
Useful Cmake arguments:
Run Tests¶
Tests can be run from the script:
dev/3_run_tests.sh
Note: The following environment variables can also be set when running tests:
INFERO_TEST_NPROCS: number of processors to use for each regression test (when MPI is enabled)
INFERO_TEST_TOL: overrides the error tolerance on tests at runtime