Running Boltz-1 on AWS hardware
Figuring out what happens when two molecules come together is computationally hard. Free Energy Perturbation (FEP) calculations are powerful, but wow, they take a while to run. The last estimate I had for this was something like 1 GPU per protein-ligand (“drug”) per day.
Not the same, but related, is Boltz-1. It’s an open source model from MIT which predicts interactions. It’s a useful step to figure out what you can ignore, or what to prioritise to explore further.
Installing on an AWS instance didn’t go as documented for me. Here’s how I got it working, on a Cuda 12.1 box using Deep Learning Base OSS Nvidia Driver GPU AMI (Ubuntu 22.04).
Install from source
You might be able to get it to work from pip install boltz but I went from source:
git clone https://github.com/jwohlwend/boltz.git
cd boltz
python -m venv venv
source ./venv/bin/activate
pip install -e .
That will give you the boltz command on your PATH to run predictions.
Linking errors
If you’re visiting this page from the future, you may not need this bit. Things will get fixed, I suspect.
After install , I ran into an import or linking error of undefined symbol: __nvJitLinkComplete_12_4.
This solution was to use something called patchelf (thank you malfet). Never heard of the tool before, but it can go and fix up issues like this.
sudo apt install patchelf
patchelf --add-rpath '$ORIGIN/../../nvidia/nvjitlink/lib' \
./venv/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so
The ./venv path there because I had installed everything into a Python virtual environment.
With that, it all runs as expected.