Getting Started
Prerequisites
- Install Docker
- Install the NVIDIA Container Toolkit
- Verify your container runtime supports NVIDIA GPUs by running
Example output:
For more information on enumerating multi-GPU systems, refer to the NVIDIA Container Toolkit’s GPU Enumeration Docs
NGC (NVIDIA GPU Cloud) Account
- Create an account on NGC
- Generate an API Key
- Docker log in with your NGC API key using
docker login nvcr.io --username='$oauthtoken' --password=${NGC_CLI_API_KEY}
NGC CLI Tool
- Download the NGC CLI tool for your OS.
Use NGC CLI version
3.41.1or newer. Here is the command to install this on AMD64 Linux in your home directory:
- Set up your NGC CLI Tool locally (You’ll need your API key for this!):
After you enter your API key, you may see multiple options for the org and team. Select as desired or hit enter to accept the default.
Model Specific Requirements
The following are specific requirements for DiffDock NIM.
Hardware
- Supported GPU models:
- Minimum GPU memory (GB): 16
Once the above requirements are met, you will use the Quickstart Guide to pull the NIM container and model, perform a health check, and then run inference.
Software
- Minimum Driver version: 535.104.05
Launch DiffDock NIM
- Pull the NIM container.
- Run container.
The environment variable
NGC_API_KEYmust be defined and valid in your local environment to ensure the following command will proceed. For information regarding personal API key setup, refer to this website.
- Open a new terminal, use the following command to check the status of API until it returns
true. This can take a couple of minutes.
Run Inference
- Open a new terminal, leaving the current terminal open with the launched service.
Open a new terminal, leaving the current terminal open with the launched service.
The “sed” command is used to convert the multi-line text file into a single line for JSON encoding.
- Prepare JSON formatted post-data. This step requires being launched in the most common bash shell environment in Linux. Users can verify if the current session is bash by using the command echo $0. If not, run the command /bin/bash before this step.
- Run Inference and save to output.json.
- The output file
output.jsonis a JSON formatted content with predicted docking poses (coordinates of ligand atoms) with the structure below:
Dump Generated Poses
- A simple Python script provided in this section is used to dump the inference results (docked poses of ligands) into a folder named as
output. Create a new blank file, name it asdump_output.pyand copy the content below into it.
- Run the command below to launch the Python script.
- List the content in the output folder.
Stopping the Container
When you’re done testing the endpoint, you can bring down the container by running docker stop diffdock-nim in a new terminal.