Skip to content
Juju Charm's Conda API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/charms/layer
.gitignore
.style.yapf
Makefile
README.md
copyright
layer.yaml
metadata.yaml
test-requirements.txt
tox.ini

README.md

layer-conda-api

Conda API

Usage

The 'conda-api' exposes a few choice functionalities to charm authors.

Include this layer in your charm, then import from charms.layer import conda_api to access the helper functions.

Install Conda

init_install_conda(url, sha, validate)

Installs a conda environment to /opt/anaconda.

Example Usage:
conda_install_url =
    "https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh"

sha256 = "7e6785caad25e33930bc03fac4994a434a21bc8401817b7efa28f53619fa9c29"

validate = "sha256"

init_install_conda(conda_install_url, sha256, validate)

Create Conda Venv

create_conda_venv(python_version, packages=None)

Create conda venv and optionally install packages.

Example Usage:
create_conda_venv('3.5', ['jupyter', 'nb_conda'])

Install Conda Pkgs

install_conda_packages(conda_packages)

Install conda packages.

Example Usage:
install_conda_packages(['jupyter', 'nb_conda'])

Install Conda Pip Pkgs

install_conda_pip_packages(conda_pip_packages)

Installs a list of pip packages into your conda environment.

Example Usage:
install_conda_pip_packages(['findspark'])

License

  • AGPLv3 (see copyright file)

Copyright

You can’t perform that action at this time.