
Follow the steps below to download and run the NVIDIA NIM inference microservice for this model on your infrastructure of choice.
$ docker login nvcr.io
Username: $oauthtoken
Password: <PASTE_API_KEY_HERE>
Pull and run the NVIDIA NIM with the command below. This will download the optimized model for your infrastructure.
export NGC_API_KEY=<PASTE_API_KEY_HERE>
export LOCAL_NIM_CACHE=~/.cache/nim
mkdir -p "$LOCAL_NIM_CACHE"
docker run -it --rm \
--runtime=nvidia \
--gpus=all \
-e NVIDIA_VISIBLE_DEVICES=0 \
-e NGC_API_KEY=$NGC_API_KEY \
--shm-size=2G \
--ulimit memlock=-1 \
--ulimit stack=67108864 \
-p 8000:8000 \
nvcr.io/nim/nvidia/genmol:latest
You can now make a local API call using this curl command:
accept_header='Accept: application/json'
content_type_header='Content-Type: application/json'
data='{
"smiles": "C124CN3C1.S3(=O)(=O)CC.C4C#N.[*{20-20}]",
"num_molecules": "30",
"temperature": "1",
"noise": "0",
"step_size":"1",
"scoring": "QED"
}'
response=$(curl --silent -i -w "
%{http_code}" --request POST \
--url http://localhost:8000/generate \
--header "$authorization_header" \
--header "$accept_header" \
--header "$content_type_header" \
--data "$data"
)
echo "$response"
For more details on getting started with this NIM, visit the NVIDIA NIM Docs.