Skip to content

Instantly share code, notes, and snippets.

@xaratustrah
Last active December 8, 2023 13:40
Show Gist options
  • Save xaratustrah/978a62cbd7f3f0ea37dc20529cdb7caf to your computer and use it in GitHub Desktop.
Save xaratustrah/978a62cbd7f3f0ea37dc20529cdb7caf to your computer and use it in GitHub Desktop.
Analysis tool chain

Installing common analysis tools for experiments

Using Docker

A separate repository hosts a dockerized version of this tutorial, please refer to that repository.

Manual installation

Installing mamba

please download the latest MINIFORGE from https://github.com/conda-forge/miniforge. MINIFORGE also contains mamba and conda executables, which are compatible. The advantage of MINIFORGE is that it by default points to conda-forge channels.

Please follow the installation instructions there, suitable for your system, i.e. Linux or OSX.

Making a new environment

By creating an environment, all files will be installed there, which is a very nice feature. Open a terminal, then create a new environment. Currently Python 3.10 is supported, so please type:

mamba create -n analysistools
mamba activate analysistools
mamba install -y python=3.10 root pyqt

Installing the rest

Now individual packages can be installed. You can save the following as a script file:

#!/bin/bash
# analysistools_installer.sh
#

mkdir /tmp/analysistools && cd "$_"
curl -LkSs https://api.github.com/repos/xaratustrah/iqtools/tarball | tar xz -C ./
curl -LkSs https://api.github.com/repos/xaratustrah/barion/tarball | tar xz -C ./
curl -LkSs https://api.github.com/repos/gwgwhc/lisereader/tarball | tar xz -C ./
curl -LkSs https://api.github.com/repos/DFreireF/rionid/tarball | tar xz -C ./
find . -maxdepth 1 -type d -exec bash -c "cd '{}' && pip install -r requirements.txt" \;
find . -maxdepth 1 -type d -exec bash -c "cd '{}' && pip install ." \;
rm -rf /tmp/analysistools

then call it by:

sh analysistools_installer.sh

Alternatively you can enter each line one by one in the shell.

Removing everything

In case you need to remove anything, since all installations are done in a mamba environment, you can just delete the whole thing using:

mamba deactivate && mamba env remove -n analysistools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment