Skip to content

Commit

Permalink
Mambaforge (Discouraged as of September 2023) (#2115)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReimarBauer authored Dec 12, 2023
1 parent 159185e commit 788d107
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ Mscolab Operations in use for more than 30 days, move to an inactive list.
The initial idea for multiple flightpaths on topview stems from bkirbus.
GSoC mentors were Reimar Bauer, Jörn Ungermann, Sonja Gisinger

With MSS 8.0.0 we base our installation on mambaforge. This has
mamba in the base environment.
With MSS 9.0.0 we base our installation on miniforge. This has
mamba in the base environment. Mambaforge is discouraged of September 2023.

All changes:
https://github.com/Open-MSS/MSS/milestone/81?closed=1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Automatically
Manually
--------

As **Beginner** start with an installation of Mambaforge
Get [mambaforge](https://github.com/conda-forge/miniforge#mambaforge) for your Operation System
As **Beginner** start with an installation of Miniforge
Get [miniforge](https://github.com/conda-forge/miniforge#download) for your Operation System


You must install mss into a new environment to ensure the most recent
Expand Down
14 changes: 7 additions & 7 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Requirements
2. Software requirement

| Python
| `Mambaforge <https://mamba.readthedocs.io/en/latest/installation.html>`_
| `Miniforge <https://github.com/conda-forge/miniforge#install>`_
| `Additional Requirements <https://github.com/Open-MSS/MSS/blob/develop/requirements.d/development.txt>`_

Expand All @@ -145,7 +145,7 @@ Requirements
Using predefined docker images instead of installing all requirements
.....................................................................

You can easily use our testing docker images which have all libraries pre installed. These are based on mambaforgen.
You can easily use our testing docker images which have all libraries pre installed. These are based on miniforge.
We provide two images. In openmss/testing-stable we have mss-stable-env and in openmss/testing-develop we have mss-develop-env defined.
In the further course of the documentation we speak of the environment mssdev, this corresponds to one of these evironments.

Expand All @@ -171,12 +171,12 @@ Use the docker env on your computer, initial setup
This example shows by using mss-stable-env how to set it up for testing and development of stable branch. The images gets updates
when we have to add new dependencies or have do pinning of existing modules. On an updated image you need to redo these steps ::

rm -rf $HOME/mambaforge/envs/mss-stable-env # cleanup the existing env
mkdir $HOME/mambaforge/envs/mss-stable-env # create the dir to bind to
rm -rf $HOME/miniforge/envs/mss-stable-env # cleanup the existing env
mkdir $HOME/miniforge/envs/mss-stable-env # create the dir to bind to
xhost +local:docker # may be needed
docker run -it --rm --mount type=volume,dst=/opt/conda/envs/mss-stable-env,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=$HOME/mambaforge/envs/mss-stable-env --network host openmss/testing-stable # do the volume bind
docker run -it --rm --mount type=volume,dst=/opt/conda/envs/mss-stable-env,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=$HOME/miniforge/envs/mss-stable-env --network host openmss/testing-stable # do the volume bind
exit # we are in the container, escape :)
sudo ln -s $HOME/mambaforge/envs/mss-stable-env /opt/conda/envs/mss-stable-env # we need the origin location linked because hashbangs interpreters are with that path. (only once needed)
sudo ln -s $HOME/miniforge/envs/mss-stable-env /opt/conda/envs/mss-stable-env # we need the origin location linked because hashbangs interpreters are with that path. (only once needed)
conda activate mss-stable-env # activate env
cd workspace/MSS # go to your workspace MSS dir
export PYTHONPATH=`pwd` # add it to the PYTHONPATH
Expand All @@ -197,7 +197,7 @@ After the image was configured you can use it like a self installed env ::
Manual Installing dependencies
..............................

MSS is based on the software of the conda-forge channel located. The channel is predefined in Mambaforge.
MSS is based on the software of the conda-forge channel located. The channel is predefined in Miniforge.

Create an environment and install the dependencies needed for the mss package::

Expand Down
18 changes: 10 additions & 8 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ Manual
Mamba based installation
........................

We strongly recommend to start from `Mambaforge <https://mamba.readthedocs.io/en/latest/installation.html>`_,


We strongly recommend to start from `Miniforge <https://github.com/conda-forge/miniforge#install>`_,
a community project of the conda-forge community.

As **Beginner** start with an installation of Mambaforge
- Get `mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`__ for your Operation System
As **Beginner** start with an installation of Miniforge
- Get `miniforge <https://github.com/conda-forge/miniforge#download>`__ for your Operation System

If you use already Mambaforge please read the `FAQ <https://github.com/conda-forge/miniforge#faq>`__

Install MSS
~~~~~~~~~~~
Expand All @@ -70,7 +74,7 @@ We suggest to create a mss user.
* login as mss user
* create a *src* directory in /home/mss
* cd src
* get `mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`__
* get `miniforge <https://github.com/conda-forge/miniforge#download>`__
* set execute bit on install script
* execute script, enable environment in .bashrc
* login again
Expand Down Expand Up @@ -99,22 +103,20 @@ Conda based installation
`Anaconda <https://www.anaconda.com/>`_ provides an enterprise-ready data analytics
platform that empowers companies to adopt a modern open data science analytics architecture.

.. warning::
Installing Mamba in Anaconda setup is not recommended. We strongly recommend to use the Mambaforge method (see above).

Please add the channel conda-forge to your defaults::

$ conda config --add channels conda-forge

The conda-forge channel must be on top of the list before the anaconda default channel.

From September 2023 libmamba is the `default installer in anaconda <https://conda.org/blog/2023-07-05-conda-libmamba-solver-rollout/>`__.

Install MSS
~~~~~~~~~~~

You must install mss into a new environment to ensure the most recent
versions for dependencies. ::

$ conda install -n base conda-libmamba-solver
$ conda create -n mssenv
$ conda activate mssenv
(mssenv) $ conda install mss=$mss_version python --solver=libmamba
Expand Down
8 changes: 4 additions & 4 deletions docs/mswms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ At current state we have to use pip to install mod_wsgi into the INSTANCE enviro

Setup a /etc/apache2/mods-available/wsgi_express.conf::

WSGIPythonHome "/home/mss-demo/mambaforge/envs/demo/"
WSGIPythonHome "/home/mss-demo/miniforge/envs/demo/"


Setup a /etc/apache2/mods-available/wsgi_express.load::
Expand All @@ -522,11 +522,11 @@ Configuration of apache mod_wsgi.conf
One posibility to setup the PYTHONPATH environment variable is by adding it to your mod_wsgi.conf. Alternativly you
could add it also to wms.wsgi.

WSGIPythonPath /home/mss/INSTANCE/config:/home/mss/mambaforge/envs/instance/lib/python3.X/site-packages
WSGIPythonPath /home/mss/INSTANCE/config:/home/mss/miniforge/envs/instance/lib/python3.X/site-packages


By this setting you override the PYTHONPATH environment variable. So you have also to add
the site-packes directory of your mambaforge installation besides the config file path.
the site-packes directory of your miniforge installation besides the config file path.

If your server hosts different instances by different users you want to setup this path in mswms_setting.py.

Expand All @@ -548,7 +548,7 @@ INSTANCE is a placeholder for your service name::
| └── wsgi
| ├── auth.wsgi
| └── wms.wsgi
├── mambaforge
├── miniforge
│   ├── bin
│   ├── conda-bld
│   ├── conda-meta
Expand Down

0 comments on commit 788d107

Please sign in to comment.