Quickstart Guide
Start NIM
This page assumes you have completed the Prerequisites (client software, NGC account and API key, Docker login to the NGC registry, and accepted license terms).
-
Export
NGC_API_KEYvariable.Only Personal API Keys or Service API Keys are supported. Legacy API keys are not supported and will result in a failed
docker pull. -
The NIM container automatically downloads models. To save time and bandwidth, provide a local cache directory. This way the NIM can reuse already downloaded models. Run the following commands to set up the cache directory.
-
Run the NIM container with the following commands.
If you have not already, visit the ProteinMPNN NGC page and click Accept Terms under the Governing Terms section before pulling the container. See Prerequisites for details.
This command starts the NIM container and exposes port 8000 for the user to interact with the NIM.
-
Open a new terminal, leaving the terminal that runs the service open. In the new terminal, wait until the health check endpoint returns
{"status":"ready"}before proceeding. This can take a couple of minutes. You can use the following command to query the health check.
Run the Python Client Example
-
Save the following Python example to a file named
nim_client.py. -
Run the example.
-
The NIM saves results to the
output.fafile in Multi-FASTA format. You can view the file using the following command.
Run the Shell Client Example
-
Save the following Shell example to a file named
nim_client.sh. -
Run the example.
-
The NIM displays the results to the terminal in JSON format. You can configure the NIM to display the results, scores, and probabilities in the Multi-FASTA output format.
Stop the Container
When you are done, press Ctrl+C in the terminal running the container. Because the docker run command does not use --rm, Docker keeps the stopped container. Run docker ps -a to find it and docker rm with its container ID to remove it.