conda-build is a packaging tool like apt-get, which is associated with anaconda cloud for package management for both python and cpp libraries.
We export the CUDA version if SINGA is compiled with CUDA enabled. The cuDNN version is fixed by SINGA and cuDNN is installed from anaconda cloud.
# for SINGA with GPU, e.g. cuda9.0-cudnn7.3.1 export CUDA=9.0
Then, we export a flag DIST to indicate if SINGA is compiled with distributed training enabled.
# to enable distributed training: DIST=ON, otherwise: DIST=OFF export DIST=OFF
We need to export both CUDA and DIST for GPU version. For CPU-only version, we do not export CUDA and DIST.
After exporting the environment variables, we need to add the necessary conda channels
conda config --add channels conda-forge conda config --add channels nusdbsystem
Then, we can execute the following commands to compile SINGA and package it
conda-build . --python 3.6
You will see the package path from the screen output, e.g., xx/yy/singa-1.2.0-cpu.tar.bz2
or xx/yy/singa-1.2.0-cudnn7.3.1_cuda9.0.tar.bz2
.
To clean the cache
conda clean -ay