Commit 805015b8 authored by Michael Krause's avatar Michael Krause 🎉
Browse files

software: add conda

parent ea824bb4
Pipeline #3568 passed with stages
in 38 seconds
......@@ -4,6 +4,9 @@ Welcome to Tardis's documentation!
Changelog
=========
3.6.1 (19.09.2019)
+ added minimal howto for Conda
3.6.1 (19.09.2019)
+ updated SPM12 section (env modules)
......
......@@ -158,6 +158,75 @@ directly. It is much more convenient to use the wrapper functions though.
:file:`source /etc/bash_completion` **or** :file:`module load virtualenvwrapper`
Conda
-----
Another approach to virtual environments (and a whole virtual operating system
in fact) is provided by a third party, commercial python distribution called
`Anaconda`_ (:file:`conda`). Though discouraged for smaller projects, you can
use an environment module to load and activate a (mini)conda distribution on the
Tardis:
.. code-block:: bash
[krause@master ~] module avail conda
-------- /opt/environment/modules --------
conda/4.7.10
[krause@master ~] module load conda
[krause@master ~] conda -V
conda 4.7.10
Once loaded, just like with `pyvenv` or `virtualenv`, you can create and manage
multiple conda environments and keep specific python versions and their library
dependencies in it. Note however, that conda will also download and manage
a large number of system libraries, which *may* make bugs very hard to debug
and could lead to unexpected reproducibility issues. Some software however can
only be installed with conda and I strongly recommend to limit the use of conda
for those specific projects.
One example of those projects is Theano and its optional dependency pygpu. To
install Theano (or other conda-only packages) you can create a new environment:
.. code-block:: bash
[krause@master ~] module load conda # activate conda itself
[krause@master ~] conda create --yes --name theano
Collecting package metadata (current_repodata.json): done
Solving environment: done
[...]
[krause@master ~] conda activate theano # activate a conda env
(theano) [krause@master ~] # now you can install packages into the env
(theano) [krause@master ~] conda install --yes numpy scipy mkl
[...]
(theano) [krause@master ~] conda install --yes theano pygpu
(theano) [krause@master ~] which python
/home/beegfs/krause/.conda/envs/theano/bin/python
(theano) [krause@master ~] python
Python 3.7.4 (default, Aug 13 2019, 20:35:49)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano as t
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
>>>
To deactivate (and possibly remove) an existing conda environment, run:
.. code-block:: bash
(theano) [krause@master ~] conda deactivate
[krause@master ~] # deactivated, safe to remove
[krause@master ~] conda remove --yes --name theano --all
Remove all packages in environment /home/beegfs/krause/.conda/envs/theano:
[...]
.. _PyPI: https://pypi.python.org/pypi
.. _pyvenv: https://virtualenvwrapper.readthedocs.io/en/latest
.. _virtualenvwrapper: https://packaging.python.org/installing/#creating-virtual-environments
.. _Anaconda: https://docs.conda.io/projects/conda
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment