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 (NVIDIA GPU Cloud) Account
- Create an account on NGC
- Generate an API Key
- Login 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.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.
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.
- 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.
The “sed” command is used to convert the multi-line text file into a single line for JSON encoding.
- 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.