tree: 861386e62f2a8dd1705409bd5c567dfa795579c2 [path history] [tgz]
  1. build.sh
  2. conda_build_config.yaml
  3. meta.yaml
  4. README.md
tool/conda/singa/README.md

Package SINGA using conda-build

conda-build is a packaging tool like apt-get, which is associated with anaconda cloud for package management for both python and cpp libraries.

Environment variables

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.

Instruction

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