Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{vis}[GCCcore/12.2.0] MONAI v1.3.0, einops v0.7.0, ITK v5.3.0, ... w/ largefiles #21140

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions easybuild/easyconfigs/e/einops/einops-0.7.0-GCCcore-12.2.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
easyblock = 'PythonPackage'

name = 'einops'
version = '0.7.0'

homepage = 'https://einops.rocks/'
description = """
Flexible and powerful tensor operations for readable and reliable code.
Supports numpy, pytorch, tensorflow, jax, and others."""

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

sources = [SOURCE_TAR_GZ]
checksums = ['b2b04ad6081a3b227080c9bf5e3ace7160357ff03043cd66cc5b2319eb7031d1']

builddependencies = [
('binutils', '2.39'),
]

dependencies = [
('Python', '3.10.8'),
]

download_dep_fail = True
use_pip = True

sanity_pip_check = True

moduleclass = 'math'
54 changes: 54 additions & 0 deletions easybuild/easyconfigs/g/grpcio/grpcio-1.57.0-GCCcore-12.2.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
easyblock = 'PythonBundle'

name = 'grpcio'
version = '1.57.0'

homepage = 'https://grpc.io/'
description = """gRPC is a modern, open source, high-performance remote procedure call (RPC)
framework that can run anywhere. gRPC enables client and server applications to
communicate transparently, and simplifies the building of connected systems."""

toolchain = {'name': 'GCCcore', 'version': '12.2.0'}
toolchainopts = {'pic': True}

use_pip = True
sanity_pip_check = True

builddependencies = [
('binutils', '2.39'),
('OpenSSL', '1.1', '', SYSTEM),
('RE2', '2023-03-01'),
]

dependencies = [
('Python', '3.10.8'),
('protobuf-python', '4.23.0'),
('Abseil', '20230125.2'),
]

exts_list = [
(name, version, {
'modulename': 'grpc',
'preinstallopts': (
# patch hardcoded /usr paths to prefix them with alternate sysroot path (if defined)
"sed -i 's@/usr@%(sysroot)s/usr@g' setup.py && "
"export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=%(parallel)s && "
# Required to avoid building with non-default C++ standard but keep other flags,
# see https://github.com/grpc/grpc/issues/34256
'export GRPC_PYTHON_CFLAGS="-fvisibility=hidden -fno-wrapv -fno-exceptions" &&'
"GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True "
"GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True "
"GRPC_PYTHON_BUILD_SYSTEM_RE2=True "
"GRPC_PYTHON_BUILD_SYSTEM_ABSL=True "
),
'patches': ['grpcio-1.57.0_use-ebroot.patch'],
'checksums': [
{'grpcio-1.57.0.tar.gz':
'4b089f7ad1eb00a104078bab8015b0ed0ebcb3b589e527ab009c53893fd4e613'},
{'grpcio-1.57.0_use-ebroot.patch':
'5faf822cd817b723ae9361e43656d0ecc7b3333a166bbab2df80b43ae588e510'},
],
}),
]

moduleclass = 'lib'
78 changes: 78 additions & 0 deletions easybuild/easyconfigs/i/ITK/ITK-5.3.0-foss-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Contributors:
# Fenglai Liu ([email protected]) - Vanderbilt University
# Alex Domingo ([email protected]) - Vrije Universiteit Brussel (VUB)
# Denis Kristak, Pavel Tománek (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 = [{'download_filename': 'v%(version)s.tar.gz', 'filename': SOURCE_TAR_GZ}]
patches = [
'ITK-5.3.0_vtk-include.patch',
'ITK-5.3.0_fix-compatibility-swig-4-1.patch',
]
checksums = [
{'ITK-5.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'
13 changes: 13 additions & 0 deletions easybuild/easyconfigs/i/ITK/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)

96 changes: 96 additions & 0 deletions easybuild/easyconfigs/m/MONAI/MONAI-1.3.0-foss-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
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 = [
('Ninja', '1.11.1'),
]

dependencies = [
('Python', '3.10.8'),
('SciPy-bundle', '2023.02'),
('PyTorch', '1.13.1'),
('einops', '0.7.0'),
('ITK', '5.3.0'),
('NiBabel', '5.2.0'),
('scikit-image', '0.21.0'),
('tensorboard', '2.15.1'),
('torchvision', '0.14.1'),
('tqdm', '4.64.1'),
('Pillow', '9.4.0'),
('openslide-python', '1.3.1'),
('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': [{'download_filename': '%(version)s.tar.gz', 'filename': SOURCE_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'
46 changes: 46 additions & 0 deletions easybuild/easyconfigs/n/NiBabel/NiBabel-5.2.0-gfbf-2022b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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'}

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

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'
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 = [{'download_filename': 'v%(version)s.tar.gz', 'filename': SOURCE_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
Loading