Skip to content

Commit

Permalink
#357 add Synthcity-0.2.10-foss-2022b + all deps
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelToman committed Jul 31, 2024
1 parent e234fce commit d5c133e
Show file tree
Hide file tree
Showing 29 changed files with 204,233 additions and 17 deletions.
51 changes: 51 additions & 0 deletions 357_Synthcity/2022b_version/HF-Datasets-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
easyblock = "PythonBundle"

name = 'HF-Datasets'
version = '2.16.1'

homepage = 'https://github.com/huggingface/datasets'
description = """
The largest hub of ready-to-use datasets for ML models with fast, easy-to-use and efficient
data manipulation tools.
"""

toolchain = {'name': 'gfbf', 'version': '2022b'}

# huggingface-hub 0.21.4 has requirement fsspec>=2023.5.0, but you have fsspec 2022.11.0.
# datasets 2.18.0 has requirement fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2022.11.0.
# datasets 2.18.0 has requirement pyarrow>=14.0.1, but you have pyarrow 11.0.0.

dependencies = [
('Python', '3.10.8'),
('SciPy-bundle', '2023.02'),
('aiohttp', '3.8.5'),
('dill', '0.3.7'),
('Arrow', '11.0.0'),
('PyYAML', '6.0'),
('tqdm', '4.64.1'),
('python-xxhash', '3.2.0'),
]

use_pip = True
sanity_pip_check = True

exts_list = [
('pyarrow_hotfix', '0.6', {
'checksums': ['79d3e030f7ff890d408a100ac16d6f00b14d44a502d7897cd9fc3e3a534e9945'],
}),
('fsspec', '2023.5.0', {
'checksums': ['b3b56e00fb93ea321bc9e5d9cf6f8522a0198b20eb24e02774d329e9c6fb84ce'],
}),
('multiprocess', '0.70.15', {
'checksums': ['f20eed3036c0ef477b07a4177cf7c1ba520d9a2677870a4f47fe026f0cd6787e'],
}),
('huggingface-hub', '0.21.4', {
'sources': ['huggingface_hub-%(version)s.tar.gz'],
'checksums': ['e1f4968c93726565a80edf6dc309763c7b546d0cfe79aa221206034d50155531'],
}),
('datasets', version, {
'checksums': ['ad3215e9b1984d1de4fda2123bc7319ccbdf1e17d0c3d5590d13debff308a080'],
}),
]

moduleclass = 'data'
102 changes: 102 additions & 0 deletions 357_Synthcity/2022b_version/ITK-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributors:
# Fenglai Liu ([email protected]) - Vanderbilt University
# Alex Domingo ([email protected]) - Vrije Universiteit Brussel (VUB)
# Denis Kristak (INUITS)
#
easyblock = 'CMakeMake'

name = 'ITK'
version = '5.3.0'

homepage = 'https://itk.org'
description = """Insight Segmentation and Registration Toolkit (ITK) provides
an extensive suite of software tools for registering and segmenting
multidimensional imaging data."""

toolchain = {'name': 'foss', 'version': '2022b'}
toolchainopts = {'pic': True, 'cstd': 'c++11'}

github_account = 'InsightSoftwareConsortium'
source_urls = [GITHUB_SOURCE]
sources = ['v%(version)s.tar.gz']
patches = [
'ITK-5.3.0_vtk-include.patch',
'ITK-5.3.0_fix-compatibility-swig-4-1.patch',
]
checksums = [
{'v5.3.0.tar.gz': '64e7e8094a5023c8f68ee042459d6319581fadb35e2fe90a4ae230ce36369db1'},
{'ITK-5.3.0_vtk-include.patch': '138ebd2e0e7f9001aba5f4a7e8145ffcf0093913d50f109ecff447773fd52a48'},
{'ITK-5.3.0_fix-compatibility-swig-4-1.patch': '0138878d96e90d6bfdc81fd4f2b5ec413d61c1de666a16842b417c2686ebf506'},
]

builddependencies = [
('CMake', '3.24.3'),
('Bison', '3.8.2'),
('Eigen', '3.4.0'),
('SWIG', '4.1.1'),
('Perl', '5.36.0'),
]
dependencies = [
('Python', '3.10.8'),
('double-conversion', '3.2.1'),
('expat', '2.4.9'),
('HDF5', '1.14.0'),
('libjpeg-turbo', '2.1.4'),
('libpng', '1.6.38'),
('LibTIFF', '4.4.0'),
('VTK', '9.2.6'),
('zlib', '1.2.12'),
]

# Features
configopts = '-DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF '
configopts += '-DModule_ITKReview=ON -DModule_ITKVtkGlue=ON -DModule_SimpleITKFilters=ON '
# Enable Python bindings
configopts += '-DITK_WRAP_PYTHON:BOOL=ON -DPython3_EXECUTABLE=$EBROOTPYTHON/bin/python '
configopts += '-DSWIG_EXECUTABLE=$EBROOTSWIG/bin/swig -DSWIG_DIR=$EBROOTSWIG '
configopts += '-DPY_SITE_PACKAGES_PATH=%(installdir)s/lib/python%(pyshortver)s/site-packages '
# Dependencies from EB
local_sys_deps = ['DOUBLECONVERSION', 'EIGEN', 'EXPAT', 'FFTW', 'HDF5', 'JPEG', 'PNG', 'SWIG', 'TIFF', 'ZLIB']
local_sys_cmake = ['-DITK_USE_SYSTEM_%s=ON' % d for d in local_sys_deps]
configopts += ' '.join(local_sys_cmake)

prebuildopts = "LC_ALL=C "

local_lib_names = ['ITKCommon', 'ITKIOHDF5', 'ITKIOJPEG', 'ITKIOPNG', 'ITKIOTIFF',
'ITKReview', 'ITKVTK', 'ITKVtkGlue', 'itkSimpleITKFilters']

sanity_check_paths = {
'files': ['bin/itkTestDriver'] +
['lib/lib%s-%%(version_major)s.%%(version_minor)s.%s' % (l, SHLIB_EXT) for l in local_lib_names],
'dirs': ['include/ITK-%(version_major)s.%(version_minor)s', 'lib/python%(pyshortver)s/site-packages', 'share'],
}

sanity_check_commands = ["python -c 'import itk'"]

modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'}

moduleclass = 'data'

# ERROR1:
# -> update ITK-5.3.0_vtk-include.patch -> change version of VTK
# [ 47%] Generating ../../castxml_inputs/itkVideoSource.xml
# cd /tmp/vsc47063/easybuild/build/ITK/5.3.0/foss-2022b/easybuild_obj/Wrapping/Modules/ITKVideoCore && ../../Generators/C
# astXML/castxml/bin/castxml -o /tmp/vsc47063/easybuild/build/ITK/5.3.0/foss-2022b/easybuild_obj/Wrapping/castxml_inputs/
# itkVideoSource.xml --castxml-gccxml --castxml-start _wrapping_ --castxml-cc-gnu "(" /apps/gent/RHEL8/cascadelake-ib/sof
# tware/GCCcore/12.2.0/bin/g++ -O2 -ftree-vectorize -fno-math-errno -fPIC -std=c++11 -Wall -Wcast-align -Wdisabled-optimi
# zation -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit
# -at-a-time -Wno-strict-overflow -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual -Wstrict-null-sentinel -fno-
# sized-deallocation -fno-sized-deallocation -std=c++14 ")" -w -c @/tmp/vsc47063/easybuild/build/ITK/5.3.0/foss-2022b/eas
# ybuild_obj/Wrapping/castxml_inputs/.castxml.inc /tmp/vsc47063/easybuild/build/ITK/5.3.0/foss-2022b/easybuild_obj/Wrappi
# ng/castxml_inputs/itkVideoSource.cxx
# In file included from /tmp/vsc47063/easybuild/build/ITK/5.3.0/foss-2022b/easybuild_obj/Wrapping/castxml_inputs/itkImage
# ToVTKImageFilter.cxx:16:
# /tmp/vsc47063/easybuild/build/ITK/5.3.0/foss-2022b/ITK-5.3.0/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.h:
# 22:10: fatal error: 'vtkImageImport.h' file not found
# #include "vtkImageImport.h"
# ^~~~~~~~~~~~~~~~~~
# 1 error generated.
# make[2]: *** [Wrapping/Modules/ITKVtkGlue/CMakeFiles/ITKVtkGlueCastXML.dir/build.make:80: Wrapping/castxml_inputs/itkIm
# ageToVTKImageFilter.xml] Error 1
# make[2]: Leaving directory '/tmp/vsc47063/easybuild/build/ITK/5.3.0/foss-2022b/easybuild_obj'
# make[1]: *** [CMakeFiles/Makefile2:32031: Wrapping/Modules/ITKVtkGlue/CMakeFiles/ITKVtkGlueCastXML.dir/all] Error 2
13 changes: 13 additions & 0 deletions 357_Synthcity/2022b_version/ITK-5.3.0_vtk-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Manually add the include directory of VTK
dirty fix for issue https://github.com/InsightSoftwareConsortium/ITK/issues/4375
author: Alex Domingo (Vrije Universiteit Brussel)
--- Wrapping/CMakeLists.txt.orig 2023-12-21 13:41:44.845008000 +0100
+++ Wrapping/CMakeLists.txt 2023-12-21 13:42:14.794328946 +0100
@@ -112,6 +112,7 @@
###############################################################################
# Configure specific wrapper modules
###############################################################################
+include_directories("$ENV{EBROOTVTK}/include/vtk-9.2/")

unset(WRAP_ITK_MODULES CACHE)

97 changes: 97 additions & 0 deletions 357_Synthcity/2022b_version/MONAI-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
easyblock = 'PythonBundle'

name = 'MONAI'
version = '1.3.0'

homepage = 'https://monai.io/'
description = """
MONAI is a PyTorch-based, open-source framework for deep learning in healthcare
imaging, part of PyTorch Ecosystem.
"""

toolchain = {'name': 'foss', 'version': '2022b'}

github_account = 'Project-MONAI'

builddependencies = [
# ('hatchling', '1.18.0'),
('Ninja', '1.11.1'),
]

dependencies = [
('Python', '3.10.8'),
('SciPy-bundle', '2023.02'),
('PyTorch', '1.13.1'),
('einops', '0.7.0'), # CREATED ok
('ITK', '5.3.0'), # CREATED ok
('NiBabel', '5.2.0'), # CREATED ok
('scikit-image', '0.21.0'),
('tensorboard', '2.15.1'), # CREATED ok
('torchvision', '0.14.1'),
('tqdm', '4.64.1'),
('Pillow', '9.4.0'),
('openslide-python', '1.3.1'), # CREATED ok
('BeautifulSoup', '4.11.1'),
]

use_pip = True

# install MONAI with list of 'extras', which require additional dependencies
local_pip_extras = "einops,fire,gdown,ignite,itk,jsonschema,lmdb,nibabel,"
local_pip_extras += "openslide,pandas,pillow,psutil,pydicom,pyyaml,scipy,"
local_pip_extras += "skimage,tensorboard,torchvision,tqdm"

# PyTorch-Ignite v0.4.11 bundled as an extension because MONAI v1.3.0 has a strict requirement on it
exts_list = [
('gdown', '4.7.1', {
'checksums': ['347f23769679aaf7efa73e5655270fcda8ca56be65eb84a4a21d143989541045'],
}),
('lmdb', '1.4.1', {
'checksums': ['1f4c76af24e907593487c904ef5eba1993beb38ed385af82adb25a858f2d658d'],
}),
('termcolor', '2.3.0', {
'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl',
'checksums': ['3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475'],
}),
('fire', '0.5.0', {
'checksums': ['a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6'],
}),
('pytorch-ignite', '0.4.11', {
'modulename': 'ignite',
'patches': ['PyTorch-Ignite-0.4.11_fix_error_on_importing_Events.patch'],
'checksums': [
{'pytorch-ignite-0.4.11.tar.gz': 'ee31096a58679417097ef7f3f27d88bec40b789ac5e13cd9ed08bc89ca8ce2e2'},
{'PyTorch-Ignite-0.4.11_fix_error_on_importing_Events.patch':
'd45c0da30c01f7ce47b7be49a6d5d6eb9529c94a0b9de89260d4b07d9d2359e0'},
],
}),
(name, version, {
'preinstallopts': 'BUILD_MONAI=1',
'source_urls': ['https://github.com/%(github_account)s/%(name)s/archive'],
'sources': ['%(version)s.tar.gz'],
'use_pip_extras': local_pip_extras,
# 2 valid checksums, as source tarball provided by GitHub for MONAI 1.3.0 slightly changed at some point
# see also https://github.com/easybuilders/easybuild-easyconfigs/issues/20617
'checksums': [('67e0f55678faad4bd38b1ea69d5de94586b20b551b8ad745415623a8b6c1c5e2',
'076d75458d490b4f2dafbf5974fcc8e07a86c03f39f5ef48c6689ab6e4347da9')],
}),
]

sanity_pip_check = True

# 'pip check' does not verify whether all optional dependencies required to support 'extras'
# are actually available, so we do it here via an import check;
local_extra_mod_check = {x: x for x in local_pip_extras.split(",")}
# Some special cases with different module name than extra name
local_extra_mod_check['pillow'] = 'PIL'
local_extra_mod_check['pyyaml'] = 'yaml'

sanity_check_commands = ["python -c 'import monai; monai.config.print_config()'"]
sanity_check_commands += ["python -c 'import %s'" % local_extra_mod_check[x] for x in local_extra_mod_check]

sanity_check_paths = {
'files': ['lib/python%%(pyshortver)s/site-packages/%%(namelower)s/_C.%s' % SHLIB_EXT],
'dirs': ['lib/python%(pyshortver)s/site-packages/ignite'],
}

moduleclass = 'vis'
50 changes: 50 additions & 0 deletions 357_Synthcity/2022b_version/NiBabel-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
easyblock = 'PythonBundle'

name = 'NiBabel'
version = '5.2.0'

homepage = 'https://nipy.github.io/nibabel'
description = """NiBabel provides read/write access to some common medical and neuroimaging file formats,
including: ANALYZE (plain, SPM99, SPM2 and later), GIFTI, NIfTI1, NIfTI2, MINC1, MINC2, MGH and ECAT
as well as Philips PAR/REC. We can read and write Freesurfer geometry, and read Freesurfer morphometry and
annotation files. There is some very limited support for DICOM. NiBabel is the successor of PyNIfTI."""

toolchain = {'name': 'gfbf', 'version': '2022b'}

# builddependencies = [
# ('hatchling', '1.18.0'),
# ]

dependencies = [
('Python', '3.10.8'),
('SciPy-bundle', '2023.02'),
('Pillow', '9.4.0'),
('pydicom', '2.4.4'), # CREATED ok
]

use_pip = True

exts_list = [
('bz2file', '0.98', {
'checksums': ['64c1f811e31556ba9931953c8ec7b397488726c63e09a4c67004f43bdd28da88'],
}),
('nibabel', version, {
'checksums': ['3df8f1ab981d1bd92f4331d565528d126ab9717fdbd4cfe68f43fcd1c2bf3f52'],
}),
]

fix_python_shebang_for = ['bin/*']

sanity_check_paths = {
'files': ['bin/nib-dicomfs', 'bin/nib-diff', 'bin/nib-ls', 'bin/nib-nifti-dx', 'bin/parrec2nii'],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = [
"nib-diff --help",
"parrec2nii --help",
]

sanity_pip_check = True

moduleclass = 'vis'
56 changes: 56 additions & 0 deletions 357_Synthcity/2022b_version/OpenSlide-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
easyblock = 'ConfigureMake'

name = 'OpenSlide'
version = '3.4.1'
versionsuffix = '-largefiles'

homepage = 'https://openslide.org/'
description = """OpenSlide is a C library that provides a simple interface to
read whole-slide images (also known as virtual slides)."""

toolchain = {'name': 'GCCcore', 'version': '12.2.0'}

source_urls = [GITHUB_SOURCE]
sources = ['v%(version)s.tar.gz']
patches = ['%(name)s-%(version)s_large_file_support.patch']
checksums = [
# v3.4.1.tar.gz
'a5d869916e370125421535dcce778b2ba625dc50d920aa4ca93bbaaa6a7b470c',
# %(name)s-%(version_major_minor)s.1_large_file_support.patch
'cb618053f4ae6c3ce37d1b8b0e4ef7c55fd17378776d13be4aa4efab91706b8c',
]

builddependencies = [
('Autotools', '20220317'),
('M4', '1.4.19'),
('pkgconf', '1.9.3'),
('binutils', '2.39'),
]

dependencies = [
('zlib', '1.2.12'),
('libpng', '1.6.38'),
('libjpeg-turbo', '2.1.4'),
('LibTIFF', '4.4.0'),
('OpenJPEG', '2.5.0'),
('libxml2', '2.10.3'),
('SQLite', '3.39.4'),
('cairo', '1.17.4'),
('Gdk-Pixbuf', '2.42.10'),
]

preconfigopts = "autoreconf -f -i && "

sanity_check_paths = {
'files': [
'bin/openslide-quickhash1sum',
'bin/openslide-show-properties',
'bin/openslide-write-png',
'lib/libopenslide.la',
'lib/libopenslide.%s' % SHLIB_EXT
],
'dirs': ['include/openslide']
}


moduleclass = 'vis'
Loading

0 comments on commit d5c133e

Please sign in to comment.