CondaEnvBuilder - evansde77/cirrus GitHub Wiki

CondaEnv Builder

The CondaEnv builder creates a development environment using conda env and installs dependencies via a conda environment.yml file. Extra pip and conda packages can be added to the env after creation using the --extra-*-requirements options as outlined below, this is to help handle some of the more gnarly package interdependencies with some of the data science tools out there

Options

  • --environment - Conda environment yaml file.
  • --extra-pip-requirements - Extra requirements files to be installed in the env by pip after creation
  • --extra-conda-requirements - Extra conda requirements files to be installed in the env by conda install after creation

Config

In the build section:

  • extra_pip_requirements - comma separated list of extra pip requirements.txt files
  • extra_conda_requirements - comma separated list of extra conda requirements files

Example

This is a good non-trivial example because it involves HoloViews and Datashader. As of this writing, it's required to install these from different conda channels. Here's how to do it.

  1. Install cirrus with conda and make sure conda is in your path.
  2. Create a new cirrus project. This example uses Python 3.6.
  3. Create an environment.yml file with these contents:
channels:
- ioam
- bokeh
- defaults
dependencies:
- holoviews=1.8.3=py36_0
- bokeh=0.12.4
- datashader
- pip:
  - configargparse==0.12.0

(You can make requirements.txt empty but you can't delete it.) 3. Execute git cirrus build --builder=CondaEnv --environment=environment.yml 4. This command should work:

venv/bin/python -c "from holoviews.operation.datashader import datashade"