From 718aafa55ced0cf2c8f473f8a7f792ff4a21ffd1 Mon Sep 17 00:00:00 2001 From: ebner Date: Mon, 23 Sep 2024 13:45:43 +0200 Subject: [PATCH] add part for anaconda/conda --- _toc.yml | 1 + admin-guide/configuration/conda.md | 60 ++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 admin-guide/configuration/conda.md diff --git a/_toc.yml b/_toc.yml index e0691cc9..7d19ebfb 100644 --- a/_toc.yml +++ b/_toc.yml @@ -57,6 +57,7 @@ chapters: - file: admin-guide/configuration/icinga2 - file: admin-guide/configuration/packages - file: admin-guide/configuration/python + - file: admin-guide/configuration/conda - file: admin-guide/configuration/package_updates - file: admin-guide/configuration/package_repositories - file: admin-guide/configuration/services diff --git a/admin-guide/configuration/conda.md b/admin-guide/configuration/conda.md new file mode 100644 index 00000000..84311181 --- /dev/null +++ b/admin-guide/configuration/conda.md @@ -0,0 +1,60 @@ +# Conda / Anaconda + +Conda / Anaconda (https://conda.org) is a package manager that can be used to easily create tailored Python environments without having required C/... binaries of some packages installed on the local system. (i.e. conda will take care that required binaries are installed into the environment) + +```{warning} +Due to certain license restrictions the usage of Anaconda at PSI is not allowed without obtaining a professional license from Anaconda.com! + +However the usage of the command `conda` and/or of packages from conda-forge is still possible - see below ... +``` + +This guide explains how to install and configure conda in accordance to the Anaconda.com license terms. + + +## Installation +On a standard Linux system the conda package can be simply installed via a: + +``` +yum install conda +``` + +To instruct puppet to install the package you can have following hiera config: + +```yaml +base::pkg_group::extra: + - 'conda' + +base::package_groups: + - 'extra' +``` + +## Configuration + +To overwrite the default configuration of conda (which would violate the license because packages would be installed from anaconda.org by default) following config file needs to be deployed in `/etc/conda/condarc.d/base.yml` (or similar): + +```yaml +channels: +- conda-forge + +# Show channel URLs when displaying what is going to be downloaded +# and in 'conda list'. The default is False. +show_channel_urls: True +always_copy: true +``` + +To place the file via Puppet/Hiera you can have following configuration: + +```yaml +files::files: + /etc/conda/condarc.d/base.yml: + content: | + channels: + - conda-forge + + # Show channel URLs when displaying what is going to be downloaded + # and in 'conda list'. The default is False. + show_channel_urls: True + always_copy: true +``` + +Afterwards conda environments can be created in a license conformed way as documented at https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html