Quickstart for RFdiffusion
This Quickstart Guide walks you through starting the RFdiffusion NIM container, checking its health, and running your first protein generation request.
Prerequisites
Review the following note before you begin.
This page assumes you have completed the Prerequisites (NGC account, API key, NGC registry login, and client software) and installed the software listed in the Support Matrix (Docker, NVIDIA Drivers, and the NVIDIA Container Toolkit).
Start NIM
Complete the following steps to start the NIM:
- Export
NGC_API_KEYvariable.
-
Set up a local cache directory.
The NIM container automatically downloads models; providing a cache lets it reuse already downloaded models, saving time and bandwidth. Execute the following command to set up the cache directory.
- Run the NIM container with the following commands.
This command will start the NIM container and expose port 8000 for the user to interact with the NIM.
-
Open a new terminal, leaving the terminal open with the just launched service.
-
Wait until the health check endpoint returns
{"status":"ready"}before proceeding.This can take a couple of minutes. In the new terminal, you can use the following command to query the health check.
Python Client Example
Complete the following steps to run a request with the Python client:
- Save the following Python example to a file named
nim_client.py.
- Execute the example.
- The example saves results to the
output.pdbfile in PDB format. You can view the file using the following command.
Shell Client Example
Complete the following steps to run a request with the Shell client:
- Save the following Shell example to a file named
nim_client.sh.
-
Execute the example.
The example displays the results to the terminal in JSON format.
Stop the Container
When you are done, press Ctrl+C in the terminal running the container, or run docker stop with the container ID shown by docker ps. Because the command does not use --rm, the stopped container remains; remove it with docker rm and the container ID shown by docker ps -a.
Next Steps
Now that you have a working setup, explore the following resources in greater detail: