Deploy Using Docker
This section describes how to deploy using Docker.
This page assumes you have prepared your environment as detailed in the Getting Started section (see the sections on setting up Docker, NGC CLI, and NGC registry access).
- Pull the Boltz-2 NIM container with the following command.
- Run the NIM container with the following command.
This command will start the NIM container and expose port 8000 for the user to interact with the NIM. It will pull the model to the cache at $LOCAL_NIM_CACHE on the local filesystem. Note: This download can take a very long time (2-10 hours on a 100+Mbps internet connection).
-
Open a new terminal, leaving the current terminal open with the launched service.
-
In the new terminal, wait until the health check end point returns
200 truebefore proceeding. This may take a couple of minutes. You can use the following command to query the health check.
To check the NIM’s status using Python, use the requests module, after installation, using pip install requests:
- Run the inference to get a multiple sequence alignment for an amino acid sequence. The following is an example of using cURL in BASH:
The following is an example, in Python, that demonstrates some of the other arguments available to the NIM:
- View the outputs. You can use the
cattool to print the outputs to the command line:
You can also view the output in a text viewer, or pretty-print it using Python’s built-in JSON module:
Multiple Sequence Alignment Formatting
The Boltz-2 NIM uses a specific JSON structure for its MSA inputs to enable compatibility with the MSA NIM and other tools. The NIM accepts MSA inputs in the following formats:
These formats can be generated using either the Boltz-2 python package or the ColabFold server (CSV), or by using an MSA search tool of your choice (A3M).
The NIM accepts MSAs in a dictionary structure that maps database names to MSA formats and their corresponding alignments. The structure is as follows:
Example with actual data:
For very large multiple sequence alignments, we recommend using functions like the following to read them directly from their formats on disk.
Advanced Usage
For Advanced Usage of the NIM, see the sections on Optimization and Performance.
For details about available endpoints, see the API Reference section.