|
| 1 | +## 🔍 Running Inference with Boltz Docker |
| 2 | + |
| 3 | +Follow the steps below to run inference using the Boltz Docker container: |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +### 🐳 1. Build the Docker Image |
| 8 | + |
| 9 | +From the root of the project directory, build the Docker image: |
| 10 | + |
| 11 | +```bash |
| 12 | +docker build -t boltz1 . |
| 13 | +``` |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +### 📁 2. Create and Set Output Directory Permissions |
| 18 | + |
| 19 | +Create an output folder and give it proper write permissions: |
| 20 | + |
| 21 | +```bash |
| 22 | +mkdir -p <output_folder_location> <model_folder_location> |
| 23 | +chmod a+w <output_folder_location> <model_folder_location> |
| 24 | + |
| 25 | +export OUTPUT=$PWD/<output_folder_location> |
| 26 | +export MODELS=$PWD/<model_folder_location> |
| 27 | +export INPUT=$PWD/<input_folder_location> |
| 28 | +``` |
| 29 | + |
| 30 | +> ⚠️ Docker needs write permissions in the `<output_folder_location>` and `<model_folder_location>` folder. `<input_folder_location>` is the folder contaning the input `.yaml` or `.fasta` file |
| 31 | +
|
| 32 | +Example |
| 33 | + |
| 34 | +```bash |
| 35 | +mkdir -p ./output ./model |
| 36 | +chmod a+w ./output ./model |
| 37 | + |
| 38 | +export OUTPUT=$PWD/output |
| 39 | +export MODELS=$PWD/model |
| 40 | +export INPUT=$PWD/examples/ |
| 41 | +``` |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +### 🚀 3. Run Inference |
| 46 | + |
| 47 | +In order to do inferencing few things needs to be done |
| 48 | +Mount the volumes for input folder and output folder. Pass the mounted volumes to boltz as arguments. So the docker run command looks like |
| 49 | + |
| 50 | +```bash |
| 51 | +docker run -it \ |
| 52 | + --shm-size=100g \ |
| 53 | + -v $INPUT:/app/boltz/input \ |
| 54 | + -v $MODELS:/home/boltz-service/.boltz/ \ |
| 55 | + -v $OUTPUT:/app/boltz/output \ |
| 56 | + boltz1 |
| 57 | +``` |
| 58 | + |
| 59 | +> 📝 The `--shm-size=100g` flag avoids shared memory issues during data loading with PyTorch. |
| 60 | +
|
| 61 | +--- |
| 62 | + |
| 63 | +### ✅ Output |
| 64 | + |
| 65 | +Results will be written to the <output_folder_location> folder. |
| 66 | + |
| 67 | +Boltz currently accepts three input formats: |
| 68 | + |
| 69 | +1. Fasta file, for most use cases |
| 70 | + |
| 71 | +2. A comprehensive YAML schema, for more complex use cases |
| 72 | + |
| 73 | +3. A directory containing files of the above formats, for batched processing |
| 74 | + |
| 75 | +## For more information checkout [boltz](https://github.com/jwohlwend/boltz) |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +Our model and code are released under MIT License, and can be freely used for both academic and commercial purposes. |
| 80 | + |
| 81 | + |
| 82 | +## Cite |
| 83 | + |
| 84 | +If you use this code or the models in your research, please cite the following paper: |
| 85 | + |
| 86 | +```bibtex |
| 87 | +@article{wohlwend2024boltz1, |
| 88 | + author = {Wohlwend, Jeremy and Corso, Gabriele and Passaro, Saro and Reveiz, Mateo and Leidal, Ken and Swiderski, Wojtek and Portnoi, Tally and Chinn, Itamar and Silterra, Jacob and Jaakkola, Tommi and Barzilay, Regina}, |
| 89 | + title = {Boltz-1: Democratizing Biomolecular Interaction Modeling}, |
| 90 | + year = {2024}, |
| 91 | + doi = {10.1101/2024.11.19.624167}, |
| 92 | + journal = {bioRxiv} |
| 93 | +} |
| 94 | +``` |
| 95 | + |
| 96 | +In addition if you use the automatic MSA generation, please cite: |
| 97 | + |
| 98 | +```bibtex |
| 99 | +@article{mirdita2022colabfold, |
| 100 | + title={ColabFold: making protein folding accessible to all}, |
| 101 | + author={Mirdita, Milot and Sch{\"u}tze, Konstantin and Moriwaki, Yoshitaka and Heo, Lim and Ovchinnikov, Sergey and Steinegger, Martin}, |
| 102 | + journal={Nature methods}, |
| 103 | + year={2022}, |
| 104 | +} |
| 105 | +``` |
0 commit comments