Skip to navigation

Custom Models

View as Markdown

The default quickstart downloads the MACE-MPA-0 medium checkpoint from Hugging Face at container startup. For the default setup, follow the Quickstart Guide.

Use Custom or Downloaded Models

You can use the default MACE-MPA-0 checkpoint or provide a supported MACE, AIMNet2, or TensorNet model by downloading it and mounting the model file or directory into the container. Choose the model type from the following tabs for download hints and the exact arguments to pass when launching the container.

MACE models are for periodic systems only (pbc: true). The default MACE-MPA-0 medium checkpoint is downloaded from Hugging Face at container startup. User-provided checkpoints from the MACE-MP model family are supported, including checkpoints trained from that model family. To use a different supported MACE checkpoint, do the following:

Downloading a MACE model

Refer to the MACE foundation model GitHub releases for download links. For example:

curl -LO https://github.com/ACEsuit/mace-foundations/releases/download/mace_mpa_0/mace-mpa-0-medium.model
export ALCHEMI_MODEL_PATH=mace-mpa-0-medium.model

Launching the container with MACE

Run the following commands to launch the container:

export ALCHEMI_MODEL_PATH=/path/to/mace.model
export NGC_API_KEY=<Your NGC API Key>
docker run --rm -ti --name alchemi-bmd --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 --shm-size=8g \
-v "${ALCHEMI_MODEL_PATH}:/opt/nim/.cache/mace.model:ro" \
-e ALCHEMI_NIM_DISABLE_MODEL_DOWNLOAD=true \
-e ALCHEMI_NIM_MODEL_TYPE="mace" \
-e ALCHEMI_NIM_MODEL_PATH=/opt/nim/.cache/mace.model \
nvcr.io/nim/nvidia/alchemi-bmd:1.1.0

Example Configurations

This section is a quick reference for common configurations. For download steps and model-type-specific launch details, refer to Use Custom or Downloaded Models.

MACE for Periodic Systems (Default)

Run the following commands:

export NGC_API_KEY=<Your NGC API Key>
docker run --rm -ti --name alchemi-bmd --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 \
--shm-size=8g \
nvcr.io/nim/nvidia/alchemi-bmd:1.1.0

AIMNet2 for Organic Molecular Systems

Run the following commands:

export ALCHEMI_MODEL_PATH=/path/to/aimnet-model.pt
docker run --rm -ti --name alchemi-bmd --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 --shm-size=8g \
-v "${ALCHEMI_MODEL_PATH}:/opt/nim/.cache/aimnet2.pt:ro" \
-e ALCHEMI_NIM_DISABLE_MODEL_DOWNLOAD=true \
-e ALCHEMI_NIM_MODEL_TYPE="aimnet2" \
-e ALCHEMI_NIM_MODEL_PATH="/opt/nim/.cache/aimnet2.pt" \
-e ALCHEMI_NIM_PBC=false \
nvcr.io/nim/nvidia/alchemi-bmd:1.1.0

TensorNet for Periodic Materials

Run the following commands:

export ALCHEMI_MODEL_PATH=/path/to/model-dir
export NGC_API_KEY=<Your NGC API Key>
docker run --rm -ti --name alchemi-bmd --gpus=all \
-e NGC_API_KEY \
-p 8000:8000 --shm-size=8g \
-v "${ALCHEMI_MODEL_PATH}:/opt/nim/.cache/TensorNet:ro" \
-e ALCHEMI_NIM_DISABLE_MODEL_DOWNLOAD=true \
-e ALCHEMI_NIM_MODEL_TYPE="tensornet" \
-e ALCHEMI_NIM_MODEL_PATH="/opt/nim/.cache/TensorNet" \
nvcr.io/nim/nvidia/alchemi-bmd:1.1.0