Getting Started
Prerequisites
For detailed hardware requirements, supported GPU configurations, and system setup instructions (Docker, NVIDIA Drivers, Container Toolkit), refer to the Support Matrix.
NGC Account
- Create an account on NGC
- Generate an API Key
- Log in to Docker with your NGC API key using
docker login nvcr.io --username='$oauthtoken' --password=<your personal NGC key>
NGC CLI Tool
- Download the NGC CLI tool for your OS.
Use NGC CLI version 3.41.1 or newer. Here is the command to install this on AMD64 Linux in your home directory:
- Set up your NGC CLI tool locally. You will need your API key for this.
After you enter your API key, you might see multiple options for the org and team. Select as desired or press Enter to accept the default.
Launch the DiffDock NIM
- Pull the NIM container.
- Run the container.
The environment variable NGC_API_KEY must be defined and valid in your local environment for the following command to proceed. For information about personal API key setup, refer to the NGC User Guide.
- Open a new terminal and use the following command to check the API status until it returns
true. This can take a couple of minutes.
Example output:
Run Inference
-
Open a new terminal, leaving the current terminal open with the launched service.
-
Prepare the JSON request body. Run this step in bash. Check the shell with
echo $0. If it is not bash, run/bin/bashfirst.
sed converts the multi-line file into one line for JSON encoding.
- Run inference and save the response to
output.json.
- The output file
output.jsonis JSON with the predicted docking poses. The fields are:
Dump Generated Poses
- Use the Python script in this section to write the docked ligand poses into a folder named
output. Create a file nameddump_output.pyand copy the content below into it.
- Run the command below to launch the Python script.
- List the content in the output folder.
Stop the Container
When you are done testing the endpoint, stop the container by running docker stop diffdock-nim in a new terminal.