diff --git a/EM/napari/README.md b/EM/napari/README.md new file mode 100644 index 0000000..0c1b1b0 --- /dev/null +++ b/EM/napari/README.md @@ -0,0 +1,12 @@ +# napari-boxmanager + +The napari module is built in combination with the crYOLO module : + +From crYOLO/1.9.9 crYOLO exists as two different conda envs, one crYOLO (code itself) env, one napari (visualization) env. +The installation notes recommend to link one into another, on Merlin7 simply two different modules and envs exist. +Users need to load one env in one terminal ( crYOLO itself) and another for visualization (napari). + +## Adding New Versions + +Adding new versions: change the environment file in the build folder accordingly (and the config.yaml file) and run the build script. + diff --git a/EM/napari/build b/EM/napari/build new file mode 100755 index 0000000..789c7bd --- /dev/null +++ b/EM/napari/build @@ -0,0 +1,27 @@ +#!/usr/bin/env modbuild + + +pbuild::configure() { + #MINICONDA INSTALL + mkdir -p "$PREFIX/miniconda" + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O "$PREFIX/miniconda/miniconda.sh" + bash "$PREFIX/miniconda/miniconda.sh" -b -u -p "$PREFIX/miniconda/" + + + #CREATE ENV , make sure to source the "correct" conda.sh + "$PREFIX/miniconda/condabin/conda" env create --name "${P}_${V}" -f "$BUILDBLOCK_DIR/environment.yaml" + +} + +#DO NOTHING +pbuild::compile(){ + : +} + +pbuild::install(){ + : +} + + + + diff --git a/EM/napari/environment.yaml b/EM/napari/environment.yaml new file mode 100644 index 0000000..422be97 --- /dev/null +++ b/EM/napari/environment.yaml @@ -0,0 +1,11 @@ +channels: + - conda-forge + - anaconda +dependencies: + - python=3.10 + - pyqt + - napari=0.4.17 + - pip + - pip: + - napari-boxmanager + diff --git a/EM/napari/files/config.yaml b/EM/napari/files/config.yaml new file mode 100644 index 0000000..7b4c0ed --- /dev/null +++ b/EM/napari/files/config.yaml @@ -0,0 +1,13 @@ +--- +format: 1 +napari: + defaults: + group: EM + overlay: base + relstage: unstable + versions: + 0.4.17: + variants: + - overlay: Alps + systems: [.*.merlin7.psi.ch] + relstage: unstable diff --git a/EM/napari/modulefile b/EM/napari/modulefile new file mode 100644 index 0000000..4855327 --- /dev/null +++ b/EM/napari/modulefile @@ -0,0 +1,34 @@ +#%Module + +module-whatis "Particle selection tool for cryo-em (crYOLO) " +module-url "https://cryolo.readthedocs.io/en/stable/installation.html#install-napari-and-the-boxmanager-plugin" +module-license "SPHIRE-crYOLO Complimentary Science Software License (http://sphire.mpg.de/wiki/doku.php?id=cryolo_license). Non-commercial academic and research purposes only" +module-maintainer "Greta Assmann " + +module-help "Napari-Boxmanager is a tool to use in combination with crYOLO (visualization for particle picking) " + +# Check for supported shell types +set shelltype [module-info shelltype] +switch -- $shelltype { + "sh" { + puts stdout "conda(){ :; };" + puts stdout "set +u" + puts stdout "source \"${PREFIX}\"/miniconda/etc/profile.d/conda.sh;\n" + } + default { + puts stderr "Shells of type '$shelltype' are NOT supported!" + } +} + + +switch [module-info mode] { + "load" { + # Relies on the anaconda module being loaded since we need to update the path + puts stdout "conda activate ${P}_${V};\n" + } + "unload" - + "remove" { + puts stdout "conda deactivate;\n" + } +} +