Skip to content

Commit

Permalink
Work update for #16, #29 and #169
Browse files Browse the repository at this point in the history
  • Loading branch information
Orient committed Jul 24, 2023
1 parent ed0c6be commit bd4da74
Show file tree
Hide file tree
Showing 23 changed files with 5,423 additions and 21 deletions.
129 changes: 129 additions & 0 deletions 169_Bonito/Bonito-0.4.0-fosscuda-2020b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# author: Denis Kristak (INUITS)
easyblock = 'PythonBundle'

name = 'Bonito'
version = '0.7.1'
versionsuffix = '-CUDA-%(cudaver)s'

homepage = 'https://github.com/nanoporetech/bonito'
description = "Convolution Basecaller for Oxford Nanopore Reads"

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

dependencies = [
('Python', '3.10.4'),
('CUDA', '11.7.0', '', SYSTEM),
('SciPy-bundle', '2022.05'),
('PyTorch', '1.12.1', '-CUDA-%(cudaver)s'),
('h5py', '3.7.0'),
('Mako', '1.2.0'),
('PyYAML', '6.0'),
('python-parasail', '1.3.3'),
('tqdm', '4.64.0'),
('apex', '20230702', '-CUDA-%(cudaver)s'),
('minimap2', '2.24'),
('CuPy', '12.1.0', '-CUDA-%(cudaver)s'),
('GenomeWorks', '2021.02.2'),
('pyspoa', '0.0.9'),
('ont-fast5-api', '3.3.0'),
('ont-remora', '2.1.2'),
('Pysam', '0.20.0'),
('pod5-file-format', '0.1.8'),
]

use_pip = True

# strip out too strict version requirements for dependencies
local_bonito_preinstallopts = "sed -i 's/[><=]=.*//g' requirements.txt && "
# fix requirements for stuff we include as a proper dependency
local_bonito_preinstallopts += "sed -i 's/genomeworks-cuda-10-2/genomeworks/g' requirements.txt && "
local_bonito_preinstallopts += "sed -i 's/cupy-cuda102/cupy/g' requirements.txt && "
local_bonito_preinstallopts += "sed -i 's/numpy~=[0-9.]*/numpy/g' requirements.txt && "
local_bonito_preinstallopts += "sed -i 's/torch~=[0-9.]*/torch/g' requirements.txt && "
local_bonito_preinstallopts += "export PATH=%(installdir)s/bin/:$PATH && "

exts_list = [
('python-editor', '1.0.4', {
'modulename': 'editor',
'checksums': ['51fda6bcc5ddbbb7063b2af7509e43bd84bfc32a4ff71349ec7847713882327b'],
}),
('alembic', '1.6.4', {
'checksums': ['becb572c6701c90ca249f97fc1ae231468cc9516df367a350901eeb9310a8d43'],
}),
('cmd2', '1.5.0', {
'checksums': ['701a8c9975c4abc45e5d13906ab149f959f812869106347323a3f89ac0e82a62'],
}),
('prettytable', '2.1.0', {
'checksums': ['5882ed9092b391bb8f6e91f59bcdbd748924ff556bb7c634089d5519be87baa0'],
}),
('cliff', '3.7.0', {
'preinstallopts': "sed -i'' 's/cmd2.*/cmd2/g' requirements.txt && ",
'checksums': ['389c81960de13f05daf1cbd546f33199e86c518ba4266c79ec7a153a280980ea'],
}),
('colorlog', '5.0.1', {
'checksums': ['f17c013a06962b02f4449ee07cfdbe6b287df29efc2c9a1515b4a376f4e588ea'],
}),
('greenlet', '1.1.0', {
'checksums': ['c87df8ae3f01ffb4483c796fe1b15232ce2b219f0b18126948616224d3f658ee'],
}),
('SQLAlchemy', '1.4.15', {
'checksums': ['0ff100c75cd175f35f4d24375a0b3d82461f5b1af5fc8d112ef0e5ceea8049e6'],
}),
('cmaes', '0.8.2', {
'checksums': ['1c04ba23ded925ef13b96f42cfbd667a905ea5b80754c750e6448b9fcda96a5d'],
}),
('optuna', '2.7.0', {
'checksums': ['eb1595108ec444e840deb0037351074144fecb7a4eff6870fc11569ab782cfc6'],
}),
('colorama', '0.4.4', {
'checksums': ['5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b'],
}),
('pyperclip', '1.8.2', {
'checksums': ['105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57'],
}),
('importlib_metadata', '4.0.1', {
'checksums': ['8c501196e49fb9df5df43833bdb1e4328f64847763ec8a50703148b73784d581'],
}),
('stevedore', '3.3.0', {
'checksums': ['3a5bbd0652bf552748871eaa73a4a8dc2899786bc497a2aa1fcb4dcdb0debeee'],
}),
('fast-ctc-decode', '0.3.5', {
'source_tmpl': 'fast_ctc_decode-%(version)s-cp38-cp38-manylinux2010_x86_64.whl',
'unpack_sources': False,
}),
('mappy', '2.24', {
}),
('seqdist', '0.0.3', {
'preinstallopts': "sed -i 's/cupy-cuda102//g' settings.ini && sed -i 's/[<>=]=[0-9].*//g' settings.ini && ",
'checksums': ['bdbbea6ebba1c6dd6698d46e23ba7858f93a7cdf0c7cbc2ea66660291acb044f'],
}),
('crf-beam', '0.0.1a0', {
'modulename': 'kbeam',
'sources': ['crf_beam-%(version)s-cp38-cp38-manylinux1_x86_64.whl'],
'unpack_sources': False,
'checksums': ['0cba80ff4d7f90595f498921cf904736e3bce558dba80de5611874d89e72312e'],
}),
('networkx', '2.5.1', {
'checksums': ['109cd585cac41297f71103c3c42ac6ef7379f29788eb54cb751be5a663bb235a'],
}),
('ont-bonito', version, {
'modulename': 'bonito',
'preinstallopts': local_bonito_preinstallopts,
'checksums': ['429310d56e2d7dabd91a9a9c972504a0aa2b6d6469563b14d4aae30adfe9a87e'],
}),
]

sanity_pip_check = True

sanity_check_paths = {
'files': ['bin/bonito'],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = [
"bonito --help",
"bonito convert --help",
"bonito download --help",
]

moduleclass = 'bio'
68 changes: 68 additions & 0 deletions 169_Bonito/CuPy/CuPy-11.4.0-foss-2021b-CUDA-11.4.1.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
easyblock = 'PythonBundle'

name = 'CuPy'
version = '12.1.0'
versionsuffix = '-CUDA-%(cudaver)s'

homepage = 'https://cupy.dev'
description = "CuPy is an open-source array library accelerated with NVIDIA CUDA."

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

builddependencies = [
('pytest', '7.3.2'),
]

dependencies = [
('Python', '3.10.4'),
('SciPy-bundle', '2022.05'),
('CUDA', '11.7.0', '', SYSTEM),
('cuDNN', '8.4.1.50', versionsuffix, SYSTEM),
('NCCL', '2.12.12', versionsuffix),
('cuTENSOR', '1.6.1.5', versionsuffix, SYSTEM),
# Adding cuSPARSELt currently makes the build fail. Keeping it around for later versions to pick up.
# ('cuSPARSELt', '0.3.0.3', versionsuffix, SYSTEM),
]

use_pip = True

exts_default_options = {'source_urls': [PYPI_LOWER_SOURCE]}

# A bunch of the tests are failing or are just having problems.
_skip_tests = [
'tests/cupyx_tests/scipy_tests',
'tests/cupyx_tests/distributed_tests',
'tests/cupyx_tests/tools_tests',
'tests/example_tests',
'tests/cupy_tests/testing_tests/test_parameterized.py',
'tests/cupy_tests/fft_tests/test_fft.py',
]
_ignore_list = ' --ignore='.join(_skip_tests)

_deselect_tests = [
'tests/cupy_tests/core_tests/test_carray.py::TestCArray32BitBoundary_param_',
# float16 has too low precision for these tests as they are written
# See https://github.com/easybuilders/easybuild-easyconfigs/pull/17526#issuecomment-1470843170 for details.
'tests/cupy_tests/linalg_tests/test_product.py::TestProduct',
]
_deselect_list = ' --deselect='.join(_deselect_tests)

exts_list = [
('fastrlock', '0.8.1', {
}),
('cupy', version, {
# Must run tests here since the required version of pytest is a builddep
# Note! test_cudnn and some others will likely fail on T4 GPUs due to out of memory.
'runtest': 'export CUPY_TEST_GPU_LIMIT=1 CUPY_CACHE_DIR="%%(builddir)s" && '
'pytest --ignore=%s --deselect=%s tests' % (_ignore_list, _deselect_list),
'testinstall': True,
}),
]

sanity_check_commands = [
"python -c 'import cupy'",
]

sanity_pip_check = True

moduleclass = 'lib'
71 changes: 71 additions & 0 deletions 169_Bonito/CuPy/pytest-7.2.2-GCCcore-11.2.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
easyblock = 'PythonBundle'

name = 'pytest'
version = '7.3.2'

homepage = 'https://docs.pytest.org/en/latest/'
description = """The pytest framework makes it easy to write small,
readable tests, and can scale to support complex functional testing for
applications and libraries."""

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

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

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

use_pip = True

exts_default_options = {'source_urls': [PYPI_LOWER_SOURCE]}

# Note! Some of the file system related tests may fail on shared file systems.
# Notably TestPOSIXLocalPath.test_copy_stat_file, TestPOSIXLocalPath.test_copy_stat_dir
# and test_source_mtime_long_long are known to fail on GPFS
# Build with buildpath and tmpdir set to a local file system to avoid this
# or use --ignore-test-failures
_skip_tests = [
'testing/io/test_terminalwriter.py',
'testing/test_terminal.py',
'testing/test_debugging.py',
'testing/test_config.py',
'testing/test_helpconfig.py',
]
_ignore_tests = ' --ignore='.join(_skip_tests)

exts_list = [
('setuptools-scm', '7.1.0', {
'source_tmpl': 'setuptools_scm-%(version)s.tar.gz',
'checksums': ['6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27'],
}),
('flit-core', '3.9.0', {
'source_tmpl': 'flit_core-%(version)s.tar.gz',
}),
('flit-scm', '1.7.0', {
'source_tmpl': 'flit_scm-%(version)s.tar.gz',
'checksums': ['961bd6fb24f31bba75333c234145fff88e6de0a90fc0f7e5e7c79deca69f6bb2'],
}),
('exceptiongroup', '1.1.2', {
}),
('hypothesis', '6.80.0', {
}),
('elementpath', '4.1.4', {
}),
('xmlschema', '2.3.1', {
}),
(name, version, {
}),
]

sanity_check_commands = [
"python -c 'import pytest'",
'cd %%(builddir)s/%%(name)s/%%(name)s-%%(version)s && %%(installdir)s/bin/pytest --ignore=%s testing'
% _ignore_tests,
]

sanity_pip_check = True

moduleclass = 'lib'
99 changes: 99 additions & 0 deletions 169_Bonito/GenomeWorks-2021.02.2-fosscuda-2020b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# author: Denis Kristak (INUITS)
easyblock = 'CMakePythonPackage'

name = 'GenomeWorks'
version = '2021.02.2'
local_commit = '691380d' # corresponds to 2021.02.2 tag
versionsuffix = '-CUDA-%(cudaver)s'

homepage = 'https://github.com/clara-parabricks/GenomeWorks'
description = "SDK for GPU accelerated genome assembly and analysis"

toolchain = {'name': 'foss', 'version': '2022a'}
toolchainopts = {'pic': True}

sources = [{
'filename': SOURCE_TAR_GZ,
'git_config': {
'url': 'https://github.com/clara-parabricks',
'repo_name': name,
'commit': local_commit,
'recursive': True,
},
}]
# no checksum for source tarball because it's created locally via 'git clone'
checksums = [None]

builddependencies = [
('CMake', '3.24.3'),
('Doxygen', '1.9.4'),
]

dependencies = [
('Python', '3.10.4'),
('CUDA', '11.7.0', '', SYSTEM),
('Autoconf', '2.71'),
('matplotlib', '3.5.2'),
('SciPy-bundle', '2022.05'),
('networkx', '2.8.4'),
('tqdm', '4.64.0'),
]

# add missing include to a file
preconfigopts = "sed -i'' 's/#include <exception>/#include <exception>\\n#include <stdexcept>/g'"
preconfigopts += " %(builddir)s/GenomeWorks/3rdparty/spoa/src/alignment_engine.cpp && """

preconfigopts += "sed -i 's/==/>=/g' %(builddir)s/GenomeWorks/pygenomeworks/requirements.txt && "
preconfigopts += "sed -i 's/~=/>=/g' %(builddir)s/GenomeWorks/pygenomeworks/requirements.txt && "

# instruction from GenomeWorks' readme
configopts = "-Dgw_cuda_gen_all_arch=OFF "
configopts += " -Dgw_build_shared=ON "

# no test targets
skipsteps = ['test']

exts_defaultclass = 'PythonPackage'

exts_default_options = {
'download_dep_fail': True,
'use_pip': True,
'sanity_pip_check': True,
}

local_genomeworks_preinstallopts = "sed -i 's/[=~]=/>=/g' requirements.txt && "
local_genomeworks_preinstallopts += "export GW_INSTALL_DIR=%(installdir)s && "
local_genomeworks_preinstallopts += "export GW_VERSION=%(version)s && "
local_genomeworks_preinstallopts += "export GW_ROOT_DIR=%(builddir)s/GenomeWorks && "

exts_list = [
('sortedcollections', '2.1.0', {
'source_urls': [PYPI_SOURCE],
'checksums': ['d8e9609d6c580a16a1224a3dc8965789e03ebc4c3e5ffd05ada54a2fed5dcacd'],
}),
('genomeworks', version, {
'sources': ['GenomeWorks-%(version)s.tar.gz'],
# no checksum for source tarball because it's created locally via 'git clone'
'checksums': [None],
'start_dir': 'pygenomeworks',
'preinstallopts': local_genomeworks_preinstallopts,
}),
]

sanity_check_paths = {
'files': ['bin/cudamapper', 'bin/cudapoa', 'bin/genome_simulator',
'lib/libgwbase.%s' % SHLIB_EXT, 'lib/libgwio.%s' % SHLIB_EXT],
'dirs': ['benchmarks', 'docs', 'include/claraparabricks/genomeworks',
'lib/python%(pyshortver)s/site-packages', 'samples', 'tests'],
}

sanity_check_commands = [
"cudamapper --help",
"cudapoa --help",
"genome_simulator --help",
"python -c 'import genomeworks'",
]

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

moduleclass = 'bio'
Loading

0 comments on commit bd4da74

Please sign in to comment.