Air Gap Deployment
About Air Gap Deployments
The microservice supports serving models in an air gap system–also known as air wall, air-gapping, or disconnected network.
If the microservice detects a model profile in the model cache, the microservice can serve that profile from the cache rather than download the model profile again. By creating a model cache, you can run the microservice without any internet connection and no connection to the NGC registry.
Caching Model Profiles
On a machine with internet access and connectivity to the NGC registry, perform the following steps to cache model profiles:
-
Export your NGC API key as an environment variable:
-
Create an directory for the model cache:
-
Optional: Determine a specific model profile to cache:
Review the output to determine the model profiles to cache.
-
Download the model profiles to cache:
For more information about the commands, refer to utilities in the NIM for LLMs documentation.
Running on Air-Gapped Systems
After the container exits and the model profiles are downloaded, transfer the air-gapped directory, ~/.cache/air-gap-nim-cache, to a path that is accessible to the air-gapped system.
Perform the following steps on the air-gapped system to start the microservice and use model cache:
-
Export an environment variable with the path to the model cache:
-
Start the container:
The key differences from the common command to start the microservice:
-
The
NGC_API_KEYenvironment variable is omitted because the microservice does not download model profiles. -
Optional: The
NIM_MODEL_PROFILEvariable specifies the model profile to run.
-