From 6a28c61c089fcb50dc03d9836bc71c1c3f669f3e Mon Sep 17 00:00:00 2001 From: Greta Assmann Date: Wed, 24 Jul 2024 11:51:17 +0200 Subject: [PATCH] add cryocare module --- EM/cryocare/README.md | 11 +++++++++++ EM/cryocare/build | 23 +++++++++++++++++++++++ EM/cryocare/environment.yaml | 10 ++++++++++ EM/cryocare/files/config.yaml | 8 ++++++++ EM/cryocare/modulefile | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 EM/cryocare/README.md create mode 100755 EM/cryocare/build create mode 100644 EM/cryocare/environment.yaml create mode 100644 EM/cryocare/files/config.yaml create mode 100644 EM/cryocare/modulefile diff --git a/EM/cryocare/README.md b/EM/cryocare/README.md new file mode 100644 index 0000000..8570033 --- /dev/null +++ b/EM/cryocare/README.md @@ -0,0 +1,11 @@ + Installation remarks for cryocare: + + - pip installation from https://pypi.org/project/cryoCARE/, (see environment.yaml) + - creation of conda env with miniconda + +Usage with Relion: module does not need to be activated , BUT : +- executables need to be provided in the relion GUI +- the modulefile in RELION needs to add the cryocare bin to the LD_LIBRARY_PATH, otherwise the libraries will not be found + + + diff --git a/EM/cryocare/build b/EM/cryocare/build new file mode 100755 index 0000000..d3169b1 --- /dev/null +++ b/EM/cryocare/build @@ -0,0 +1,23 @@ +#!/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/cryocare/environment.yaml b/EM/cryocare/environment.yaml new file mode 100644 index 0000000..06b66c2 --- /dev/null +++ b/EM/cryocare/environment.yaml @@ -0,0 +1,10 @@ +channels: + - conda-forge + - defaults +dependencies: + - python=3.8 + - cudatoolkit=11.0 + - cudnn=8.0 + - pip: + - tensorflow==2.4 + - cryoCARE diff --git a/EM/cryocare/files/config.yaml b/EM/cryocare/files/config.yaml new file mode 100644 index 0000000..5efcd34 --- /dev/null +++ b/EM/cryocare/files/config.yaml @@ -0,0 +1,8 @@ +format: 1 +cryocare: + defaults: + group: EM + overlay: base + relstage: unstable + versions: + 0.3.0: diff --git a/EM/cryocare/modulefile b/EM/cryocare/modulefile new file mode 100644 index 0000000..2c0f37a --- /dev/null +++ b/EM/cryocare/modulefile @@ -0,0 +1,34 @@ +#%Module1.0 + +module-whatis "Cryocare - Content-Aware Image Restoration for Cryo-Transmission Electron Microscopy Data" +module-url "https://github.com/juglab/cryoCARE_T2T" +module-license "BSD 2-Clause Simplified License" +module-maintainer "Greta Assmann " + +module-help "https://arxiv.org/abs/1810.05420" + + +# Check for supported shell types +set shelltype [module-info shelltype] +switch -- $shelltype { + "sh" { + 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" + } +} + +