Environment Variables#
Environment variables used by the AIM Engine operator and artifact downloader.
Operator Environment Variables#
Variable |
Description |
|---|---|
|
Namespace where the operator is deployed. Set automatically by the deployment. |
|
Operator pod name. Used for discovery lock identity. |
Artifact Downloader Variables#
These are set automatically by the operator on download jobs.
Download Configuration#
Variable |
Default |
Description |
|---|---|---|
|
|
Comma-separated protocol sequence for HuggingFace downloads. Tried in order; falls back on failure. |
|
|
PVC mount path in the download container. |
|
|
Download target directory. |
|
(computed) |
Expected model size in bytes. |
|
(from resource) |
Name of the AIMArtifact resource. |
|
(from resource) |
Namespace of the AIMArtifact resource. |
|
|
Seconds without any byte-size growth before the progress monitor considers a download stalled and kills it (so the next protocol is tried). |
|
|
Seconds between progress-monitor size measurements/status updates. |
|
|
Upper bound (seconds) for a single |
|
|
Temporary directory for downloads. |
|
|
HuggingFace cache directory. |
Download Protocols#
The AIM_DOWNLOADER_PROTOCOL variable accepts a comma-separated list of:
Protocol |
Description |
|---|---|
|
XetHub protocol — fastest for large models |
|
HuggingFace Transfer — optimized multi-part download |
|
Standard HTTP — slowest but most compatible |
The downloader tries each protocol in order. On failure, it cleans up .incomplete files and moves to the next protocol.
Verification#
Variable |
Default |
Description |
|---|---|---|
|
(unset) |
When set to any non-empty value, preserves the HuggingFace metadata cache on integrity verification failure. By default, the metadata cache is removed on failure to ensure a clean retry. |
Debug and Simulation Variables#
These are for testing only and should not be used in production.
Variable |
Description |
|---|---|
|
Enable HuggingFace download simulation mode. |
|
Comma-separated protocols to simulate failure (e.g., |
|
Sleep duration per simulated attempt (default: |
|
Comma-separated protocols whose simulated download hangs (via |
|
Sleep duration for a hanging simulated download (default: |
|
Make the progress monitor’s |
|
How many of the first |
|
Simulate general download phases. |
|
Simulated download duration (default: |
|
Simulated verify duration (default: |
|
Simulate verification failure. |
|
Cause the downloader to hang (testing finalizer behavior). |
|
Cause immediate download failure. |
For typed S3 connections, AIMArtifact.spec.env accepts only
AIM_S3_LOG_LEVEL, AIM_S3_MAX_WORKERS, AIM_S3_MAX_CONCURRENCY, and
AIM_S3_MULTIPART_CHUNKSIZE_MB, with bounded literal values. Proxy, transport,
trust, process, and credential-provider variables must be configured in the
administrator-owned RuntimeConfig. AIM_S3_LOG_LEVEL affects only downloader
package logs; AWS SDK and HTTP wire loggers remain at WARNING.
Inference Container Variables#
These are set on inference containers by the operator. The “Source” column lists where the value comes from in v1alpha2 (AIMProfile) and v1alpha1 (AIMServiceTemplate).
Variable |
Source |
Description |
|---|---|---|
|
Constant |
Base path for cached model artifacts. |
|
Constant |
Always |
|
Profile (v1alpha2) / Template (v1alpha1) |
AIM product family identifier (e.g., |
|
Profile (v1alpha2) |
Runtime engine selected from the resolved profile’s |
|
Profile (v1alpha2) / Template (v1alpha1) |
Active profile identifier. For custom-profile templates (v1alpha1), set to |
|
Profile / Template |
Optimization metric ( |
|
Profile / Template |
Model precision (e.g., |
|
Profile / Template |
Model identifier for custom models (base container deployments). Mutually exclusive with |
|
Merged |
JSON-encoded engine arguments. v1alpha2: merged from service |
|
Adapter controller |
Static mode: inferred from the largest declared adapter rank. Dynamic mode: |
Environment Variable Merge Order#
For variables that are not framework-owned, the most specific value wins:
Framework-owned v1alpha2 variables
AIM_ENGINE, AIM_PROFILE_ID, AIM_ID, AIM_MODEL_ID, and
AIM_CACHE_PATH are assembled from the resolved profile and cache state after
normal environment merging. Values with those names in service or profile
containerEnv do not override the operator-managed values. Configure the
corresponding profile fields instead.
AIMService.spec.env(highest priority)AIMService.spec.profileOverrides.engineEnv/containerEnv(overlay on top of the resolved profile)Resolved
AIMProfile/AIMClusterProfileenv (spec.engineEnv,spec.containerEnv, plus profile-derived vars such as metric/precision)Merged runtime config env (
AIMRuntimeConfig.spec.envoverridingAIMClusterRuntimeConfig.spec.env)Operator defaults (lowest priority)
AIMService.spec.env(highest priority)AIMServiceTemplate.spec.env(plus template-derived vars such as metric/precision/profile)Merged runtime config env (
AIMRuntimeConfig.spec.envoverridingAIMClusterRuntimeConfig.spec.env)Operator defaults (lowest priority)
Next Steps#
Model Caching Guide — Download protocol configuration
Private Registries — Authentication environment variables
CLI and Operator Flags — Operator binary flags