Skip to content

{bio}[foss/2024a] Boltz-2 v2.2.1 w/ CUDA 12.6.0#25228

Draft
migueldiascosta wants to merge 5 commits into
easybuilders:developfrom
migueldiascosta:20260206105524_new_pr_Boltz-2221
Draft

{bio}[foss/2024a] Boltz-2 v2.2.1 w/ CUDA 12.6.0#25228
migueldiascosta wants to merge 5 commits into
easybuilders:developfrom
migueldiascosta:20260206105524_new_pr_Boltz-2221

Conversation

@migueldiascosta
Copy link
Copy Markdown
Member

@migueldiascosta migueldiascosta commented Feb 6, 2026

(created using eb --new-pr)

likely missing dependencies, some were from open PRs that may have been merged in the meantime, will add the missing ones after the tests flag them

Also, I initially named this "Boltz-2" because people refer to it as something separate from "Boltz-1", but the repo, etc is just "Boltz", so it's likely more consistent to rename it, which will allow using templates like GITHUB_SOURCE, etc

@github-actions github-actions Bot added the 2024a issues & PRs related to 2024a common toolchains label Feb 6, 2026
@migueldiascosta migueldiascosta marked this pull request as draft February 6, 2026 10:55
@bedroge
Copy link
Copy Markdown
Contributor

bedroge commented Apr 8, 2026

@migueldiascosta As we had a request for this software, I gave your easyconfigs a try. However, the tests are failing with import errors like:

ImportError: cannot import name 'MODEL_URL' from 'boltz.main' 

That's imported here, but the main.py of version 2 does indeed not define this at all, the one for version 1 does (https://github.com/jwohlwend/boltz/blob/v1.0.0/src/boltz/main.py#L27). So it looks like these tests have not updated for version 2(?). Just wondering: did you simply skip the tests?

@migueldiascosta
Copy link
Copy Markdown
Member Author

@bedroge yes, this is a draft PR, please see the #alphafold channel on the easybuild slack for context. I didn't do anything else since then but maybe Max Gamill has

('cuequivariance-torch', '0.8.1', {
'checksums': ['03a924b7a4c57bed87ca3d0345218eb805d8d2e848f5f5c57192a2e4a8ebc3db'],
}),
('cuequivariance-ops-torch-cu12', '0.8.1', {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got a failing sanity check due to a missing dependency for this package:

cuequivariance-ops-torch-cu12 0.8.1 requires cuequivariance-ops-cu12, which is not installed.

@bedroge
Copy link
Copy Markdown
Contributor

bedroge commented Apr 9, 2026

I was able to install the CUDA version using some additional changes:

$ cat Boltz-2-2.2.1-foss-2024a-CUDA-12.6.0.eb 
easyblock = 'PythonBundle'

name = 'Boltz-2'
version = '2.2.1'
versionsuffix = '-CUDA-%(cudaver)s'

homepage = 'https://github.com/jwohlwend/boltz'
description = """
Boltz-2 is a new biomolecular foundation model that goes beyond AlphaFold3 and Boltz-1
by jointly modeling complex structures and binding affinities, a critical component towards accurate molecular design.
"""

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

builddependencies = [
    ('hatchling', '1.27.0'),
]
dependencies = [
    ('CUDA', '12.6.0', '', SYSTEM),
    ('Python', '3.12.3'),
    ('Python-bundle-PyPI', '2024.06'),
    ('SciPy-bundle', '2024.05'),
    ('Biopython', '1.84'),
    ('PyYAML', '6.0.2'),
    ('PyTorch', '2.7.1', '-CUDA-%(cudaver)s'),
    ('Hydra', '1.3.2'),
    ('PyTorch-Lightning', '2.5.6', '-CUDA-%(cudaver)s'),
    ('RDKit', '2025.03.3'),
    ('dm-tree', '0.1.9'),
    ('einops', '0.8.1'),
    ('gemmi', '0.7.1'),
    ('numba', '0.60.0'),
    ('scikit-learn', '1.6.1'),
    ('wandb', '0.20.1'),
]

exts_list = [
    ('urllib3', '2.0.7', {
        'checksums': ['c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84'],
    }),
    ('ihm', '1.7', {
        'checksums': ['f7d3b9a76d9652f7091bbd1c6bea044a1d40b35bcba9b64c8e51a061fc2463de'],
    }),
    ('frozendict', '2.4.5', {
        'checksums': ['fd7add309789595c044c0155a0bddfa9d20c77f65de1e33a14aa3033b936ef63'],
    }),
    ('types-requests', '2.32.0.20240914', {
        'modulename': False,
        'checksums': ['2850e178db3919d9bf809e434eef65ba49d0e7e33ac92d588f4a5e295fffd405'],
    }),
    ('einx', '0.3.0', {
        'checksums': ['17ff87c6a0f68ab358c1da489f00e95f1de106fd12ff17d0fb3e210aaa1e5f8c'],
    }),
    ('fairscale', '0.4.13', {
        'checksums': ['1b797825c427f5dba92253fd0d8daa574e8bd651a2423497775fab1b30cfb768'],
    }),
    ('mashumaro', '3.14', {
        'checksums': ['5ef6f2b963892cbe9a4ceb3441dfbea37f8c3412523f25d42e9b3a7186555f1d'],
    }),
    ('modelcif', '1.2', {
        'checksums': ['517d2a7be67c96fd56dcc3b50cf7bb0b130958c325653d9925f9a5dbfe151d78'],
    }),
    ('chembl-structure-pipeline', '1.2.4', {
        'checksums': ['e381500ac815ded31cc4841d1fbfe7c089788a07f2fbaa9bb818b52facfa9030'],
    }),
    ('packaging', '25.0', {
        'checksums': ['d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f'],
    }),
    ('opt-einsum', '3.4.0', {
        'modulename': 'opt_einsum',
        'checksums': ['96ca72f1b886d148241348783498194c577fa30a8faac108586b14f1ba4473ac'],
    }),
    ('cuequivariance', '0.8.1', {
        'checksums': ['f398dd0b61f80894994ef12a6ac7dd844e3d301a5486b99ff17d0082f1e22b4c'],
    }),
    ('cuequivariance-torch', '0.8.1', {
        'checksums': ['03a924b7a4c57bed87ca3d0345218eb805d8d2e848f5f5c57192a2e4a8ebc3db'],
    }),
    ('nvidia-ml-py', '13.590.44', {
        'checksums': ['b358c7614b0fdeea4b95f046f1c90123bfe25d148ab93bb1c00248b834703373'],
        'modulename': 'pynvml',
    }),
    ('cuequivariance-ops-cu12', '0.8.1', {
        'source_tmpl': 'cuequivariance_ops_cu12-0.8.1-py3-none-manylinux_2_24_%(arch)s.manylinux_2_28_%(arch)s.whl',
        'checksums': [{
            'cuequivariance_ops_cu12-0.8.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl': (
                '7bbdf5802748dbfecdf01dc886a406840eed81296f83e119222a5ec99421f917'
            ),
            'cuequivariance_ops_cu12-0.8.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl': (
                '418b593c7a43849c300988a19a8202e52ca6d47271bf1603cceb6f3ab5e4aa5a'
            ),
        }],
        'postinstallcmds': [
            # Remove dependency on nvidia-cublas, which is provided by the CUDA module
            'sed -i "s@Requires-Dist: nvidia-cublas-cu12@#Requires-Dist: nvidia-cublas-cu12@" '
            '%(installdir)s/lib/python%(pyshortver)s/site-packages/cuequivariance_ops_cu12-0.8.1.dist-info/METADATA',
        ],
        'modulename': 'cuequivariance_ops',
    }),
    ('cuequivariance-ops-torch-cu12', '0.8.1', {
        'source_tmpl':
           'cuequivariance_ops_torch_cu12-0.8.1-cp312-cp312-manylinux_2_27_%(arch)s.manylinux_2_28_%(arch)s.whl',
        'checksums': [{
            'cuequivariance_ops_torch_cu12-0.8.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl': (
                '839a262c6bb461684e7d929f5bf4b96c2fa58a5308e64c213ec7835fb1c3907e'
            ),
            'cuequivariance_ops_torch_cu12-0.8.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl': (
                '4770c4e730cd19abaa1e9b2e18845b25fccb2df0a195d132d01e428980804cf2'
            )
        }],
        'modulename': False, # 'cuequivariance_ops_torch', -> needs libcuda.so.1, i.e. only works on GPU nodes
    }),
    ('boltz', version, {
        'checksums': ['dfbc5847a9d378a1e24829ff53c3faa182fb945775074712c130a3884710736d'],
        'preinstallopts': 'sed -i -e \'s/==.*/\\",/g\' pyproject.toml && ',
        'source_urls': ['https://github.com/jwohlwend/boltz/archive/refs/tags/'],
        'source_tmpl': 'v%(version)s.tar.gz',
        'runtest': 'export HOME=%(builddir)s && cd %(start_dir)s && pytest -svv tests/',
        'testinstall': True}),
]

sanity_check_commands = ["boltz 2>&1 | grep 'Usage: boltz'"]

moduleclass = 'bio'

This version adds cuequivariance-ops-cu12 (and removes the cublas dependency from its metadata, as it's provided by CUDA), adds aarch64 support for the prebuilt wheels that are used, and skips a sanity check for cuequivariance-ops-torch-cu12 to ensure that it still can be installed on non-GPU nodes (by using 'modulename': False, the import check would otherwise complain about not being able to find libcuda.so.1). Finally, I still built with --ignore-test-failure, as the tests just seem completely broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2024a issues & PRs related to 2024a common toolchains new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants