diff --git a/easybuild/easyconfigs/c/CSBDeep/CSBDeep-0.7.4-foss-2023a-CUDA-12.1.1.eb b/easybuild/easyconfigs/c/CSBDeep/CSBDeep-0.7.4-foss-2023a-CUDA-12.1.1.eb new file mode 100644 index 000000000000..1c31a6086b11 --- /dev/null +++ b/easybuild/easyconfigs/c/CSBDeep/CSBDeep-0.7.4-foss-2023a-CUDA-12.1.1.eb @@ -0,0 +1,39 @@ +# This easyconfig was created by the BEAR Software team at the University of Birmingham. +# update: foss/2023a thembl +easyblock = 'PythonBundle' + +name = 'CSBDeep' +version = '0.7.4' +versionsuffix = '-CUDA-%(cudaver)s' + +homepage = "https://csbdeep.bioimagecomputing.com/" +description = """CSBDeep is a toolbox for Content-aware Image Restoration (CARE).""" + +toolchain = {'name': 'foss', 'version': '2023a'} + +dependencies = [ + ('Python', '3.11.3'), + ('CUDA', '12.1.1', '', SYSTEM), + ('SciPy-bundle', '2023.07'), + ('TensorFlow', '2.15.1', versionsuffix), + ('matplotlib', '3.7.2'), + ('tqdm', '4.66.1'), +] + +use_pip = True +sanity_pip_check = True + +exts_list = [ + ('tifffile', '2023.9.26', { + 'checksums': ['67e355e4595aab397f8405d04afe1b4ae7c6f62a44e22d933fee1a571a48c7ae'], + }), + (name, version, { + 'modulename': '%(namelower)s', + 'source_tmpl': '%(namelower)s-%(version)s.tar.gz', + 'checksums': ['85d6fc360bb33253ba6f543d75cf0cf123595f0ea4dd1fa76b1e5bc8fc55b901'], + }), +] + +sanity_check_commands = ['care_predict'] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1-foss-2023a-CUDA-12.1.1.eb b/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1-foss-2023a-CUDA-12.1.1.eb new file mode 100644 index 000000000000..445545100745 --- /dev/null +++ b/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1-foss-2023a-CUDA-12.1.1.eb @@ -0,0 +1,65 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2024/05 +easyblock = 'PythonBundle' + +name = 'cryoCARE' +version = '0.3.1' +versionsuffix = '-CUDA-%(cudaver)s' + +homepage = 'https://github.com/juglab/cryoCARE_pip' +description = """This package is a memory efficient implementation of cryoCARE. + +This setup trains a denoising U-Net for tomographic reconstruction according to + the Noise2Noise training paradigm. Therefore the user has to provide two +tomograms of the same sample. The simplest way to achieve this is with direct- +detector movie-frames. + +You can use Warp to generate two reconstructed tomograms based on the even/odd +frames. Alternatively, the movie-frames can be split in two halves (e.g. with +MotionCor2 -SplitSum 1 or with IMOD alignframes -debug 10000) from which two +identical, up to random noise, tomograms can be reconstructed. + +These two (even and odd) tomograms can be used as input to this cryoCARE +implementation.""" + +toolchain = {'name': 'foss', 'version': '2023a'} + + +dependencies = [ + ('Python', '3.11.3'), + ('CUDA', '12.1.1', '', SYSTEM), + ('SciPy-bundle', '2023.07'), + ('TensorFlow', '2.15.1', versionsuffix), + ('mrcfile', '1.5.0'), + ('tqdm', '4.66.1'), + ('matplotlib', '3.7.2'), + ('CSBDeep', '0.7.4', versionsuffix), # cryoCARE 0.3.1 requires < 0.8.0 +] + +use_pip = True +sanity_pip_check = True + +exts_list = [ + (name, version, { + 'patches': [ + '%(name)s-0.3.0_relax_requirements.patch', + 'cryoCARE-0.3.1_fix_np1.20.0deprecations.patch', + ], + 'source_urls': ['https://github.com/juglab/cryoCARE_pip/archive/refs/tags/'], + 'sources': ['v%(version)s.tar.gz'], + 'checksums': [ + {'v0.3.1.tar.gz': 'faf1e06e4a893bf01a6a70b207b75c6ff190310d03fb9b9b56a4be7937935d54'}, + {'cryoCARE-0.3.0_relax_requirements.patch': + 'a44814f6e568f5fb618cf789d21a6b5714fbda78b4170ec8e868e50fb0f2a5c0'}, + {'cryoCARE-0.3.1_fix_np1.20.0deprecations.patch': + 'a25e3a540016db02d47b82e2104763e376340b80d0d1012ece7bb4a53f8bcdb9'} + ], + }), +] + +sanity_check_commands = [ + 'cryoCARE_extract_train_data.py --help', + 'cryoCARE_train.py --help', + 'cryoCARE_predict.py --help', +] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1_fix_np1.20.0deprecations.patch b/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1_fix_np1.20.0deprecations.patch new file mode 100644 index 000000000000..7be1c194054b --- /dev/null +++ b/easybuild/easyconfigs/c/cryoCARE/cryoCARE-0.3.1_fix_np1.20.0deprecations.patch @@ -0,0 +1,18 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de +# cryoCARE has requirement numpy ~1.19.2, but we are using newer with SciPy-bundle +# numpy.bool is deprecated sind v 1.20.0: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. +diff -ru cryoCARE_pip-0.3.1/cryocare/internals/CryoCAREDataModule.py cryoCARE_pip-0.3.1_fix_np1.20.0deprecations/cryocare/internals/CryoCAREDataModule.py +--- cryoCARE_pip-0.3.1/cryocare/internals/CryoCAREDataModule.py 2023-12-11 10:19:20.000000000 +0100 ++++ cryoCARE_pip-0.3.1_fix_np1.20.0deprecations/cryocare/internals/CryoCAREDataModule.py 2024-12-04 10:49:42.527101697 +0100 +@@ -121,9 +121,9 @@ + + # If no mask is specified, just create a one-mask + if mask_path is None: +- mask = np.ones(even.data.shape).astype(np.bool) ++ mask = np.ones(even.data.shape).astype(np.bool_) + else: +- mask = mrcfile.read(mask_path).astype(np.bool) ++ mask = mrcfile.read(mask_path).astype(np.bool_) + + assert even.data.shape == mask.data.shape, '{} and {} tomogram / mask have different shapes.'.format(even_path, + mask_path)