Tuning Parameters#
Use the Quickstart Guide to launch the default NIM. For model-specific setup, refer to Custom Models.
Configuration Options#
For the complete configuration reference and all environment variables, refer to Configuration and Environment Variables.
Example Configurations#
The following examples highlight runtime options that affect optimization behavior.
TensorNet With Cell Optimization#
Run the following commands:
export ALCHEMI_MODEL_PATH=/path/to/model-dir
docker run --rm -ti --name alchemi-bgr --gpus=all \
-p 8000:8000 --shm-size=8g \
-v "${ALCHEMI_MODEL_PATH}:/opt/nim/.cache/TensorNet:ro" \
-e NIM_DISABLE_MODEL_DOWNLOAD=true \
-e ALCHEMI_NIM_MODEL_TYPE="tensornet" \
-e ALCHEMI_NIM_MODEL_PATH="/opt/nim/.cache/TensorNet" \
-e ALCHEMI_NIM_BGR_CELLOPT=true \
-e ALCHEMI_NIM_BGR_OPTTOL_PRESSURE=0.1 \
nvcr.io/nim/nvidia/alchemi-bgr:${__container_version}
MACE With DFT-D3 Dispersion#
Run the following commands:
export NGC_API_KEY=<Your NGC API Key>
docker run --rm -ti --name alchemi-bgr --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 --shm-size=8g \
-e ALCHEMI_NIM_DFT3_ENABLED=true \
-e ALCHEMI_NIM_DFT3_PARAM='{"s8": 0.3908, "a1": 0.5660, "a2": 3.1280}' \
nvcr.io/nim/nvidia/alchemi-bgr:${__container_version}
Per-Request Parameters#
Individual requests can override global configuration parameters as shown in the following example:
import requests
package = {
'atoms': [{
'coord': [0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
'numbers': [1, 1],
'cell': [10, 0, 0, 0, 10, 0, 0, 0, 10],
}],
# Override global settings for this request
'opttol': 0.001, # Tighter force convergence
'cellopt': True, # Enable cell optimization
'opttol_pressure': 0.1 # Tighter pressure convergence
}
result = requests.post("http://localhost:8000/v1/infer", json=package)
print(result.json())