Skip to main content

Protein prediction models with Modal

Project description

boileroom: protein prediction models across Modal and Apptainer

Python 3.12 License: MIT PyPI version GitHub last commit GitHub issues

boileroom is a Python package that provides a unified interface to protein prediction models across Modal's serverless GPUs and Apptainer-based local or HPC execution.

🚨🚨🚨 v0.3.0 introduced major changes, including new models and inference backends. If you're upgrading from v0.2, please see the Migration Guide for details on breaking changes and how to update your code. 🚨🚨🚨

⚠️ Note: This package is currently in active development. The API and features may change between versions. We recommend pinning your version in production environments.

Features

  • 🚀 Modal and Apptainer execution backends
  • 🔄 Unified API across different models and runtimes
  • 🎯 Production-ready with GPU acceleration
  • 📦 Easy installation and deployment

Installation

  1. Install the package using pip:
pip install boileroom
  1. If you plan to use Modal, set up Modal credentials:
modal token new

For local containerized execution instead, install Apptainer and use backend="apptainer".

Quick Start

from boileroom import ESMFold

# Use Modal by default; pass backend="apptainer" for local containerized execution
model = ESMFold()

# Predict structure for a protein sequence
sequence = "MLKNVHVLVLGAGDVGSVVVRLLEK"

result = model.fold(sequence, options={"include_fields": ["plddt"]})

# Access prediction results
atom_array = result.atom_array[0]
coordinates = atom_array.coord
confidence = result.plddt[0]  # Requested explicitly via include_fields above

Available Models

Model Status Description Reference
ESMFold Fast protein structure prediction Facebook (now Meta)
ESM-2 MSA-free embedding model Facebook (now Meta)
Chai-1 Protein design and structure prediction model Chai Discovery
Boltz-2 Diffusion-based protein structure prediction Boltz / MIT

Development

  1. Clone the repository:
git clone https://github.com/jakublala/boileroom
cd boileroom
  1. Install development dependencies using uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.12
uv sync
  1. Run tests:
uv run pytest

For Modal integration tests, run the model families in parallel shards:

uv run pytest -v -n 4 --dist loadgroup -m integration

This starts four pytest workers and keeps each model family on its own worker, so Boltz, Chai, ESM2, and ESMFold use separate Modal apps without registering unrelated GPU functions in the same app.

To run the same integration tests in series, omit xdist:

uv run pytest -v -m integration

or only one test that's more verbose and shows print statements:

uv run python -m pytest tests/test_basic.py::test_esmfold_batch -v -s

To specify a GPU type for Modal backend tests (defaults to T4 if not specified):

uv run pytest --gpu A100-40GB

To run Modal integration tests against a specific Docker Hub namespace, image tag, and GPU type:

BOILEROOM_IMAGE_TAG=cuda12.6-my-test-tag uv run pytest -v -n 4 --dist loadgroup -m integration \
  --docker-user <your-dockerhub-user> \
  --gpu A10

The same env var works for the Apptainer backend; for Apptainer you can also pass the tag inline as --backend apptainer:<tag> (the inline suffix wins over the env var).

Available GPU options include T4, A100-40GB, A100-80GB, and other Modal-supported GPU types.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use boileroom in your research, please cite:

@software{boileroom2025,
  author = {Lála, Jakub},
  title = {boileroom: serverless protein prediction models},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/softnanolab/boileroom}
}

Acknowledgments

  • Modal Labs for the serverless infrastructure
  • The teams behind ESMFold, AlphaFold, and other protein prediction models

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boileroom-0.3.0.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

boileroom-0.3.0-py3-none-any.whl (88.6 kB view details)

Uploaded Python 3

File details

Details for the file boileroom-0.3.0.tar.gz.

File metadata

  • Download URL: boileroom-0.3.0.tar.gz
  • Upload date:
  • Size: 5.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for boileroom-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5f30bf46b1ad836a9b54c5e74b72fde11cb560e7590f9e652cae3e1ed0aca91e
MD5 6fc140cface7e0e330eeee9807d4eb20
BLAKE2b-256 606125f51a1fbae2c14f4ddc9b9099e21d944ac4861db75772d4eb138556d0cf

See more details on using hashes here.

File details

Details for the file boileroom-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: boileroom-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 88.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for boileroom-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cd1d5197bde8654bb9350c180f0c70103034c3b2634df1228efad412993d8a8
MD5 0bfdf6cb16c00d8788c41ca3a2a011e6
BLAKE2b-256 fdd53c60defc3d4476faa4ae0125b5338197cecbc5cdca342642d89cba50a211

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page