Image Build Precautions in Shared GPU Scenarios
Updated at:2025-10-27
- The following environment variables will be injected by the cloud-native AI component CCE GPU Manager. Do not add them to the image’s environment variables:
| Environment variables | Description |
|---|---|
| NVIDIA_VISIBLE_DEVICES | Visible GPU device list: Assigned by the scheduler |
| NVIDIA_VISIBLE_GPUS_SLOT | Visible GPU device slots: Assigned by the scheduler |
| NVIDIA_VISIBLE_GPUS_UUID | A list of visible GPU devices in UUID format: Assigned by the scheduler |
| LD_LIBRARY_PATH | It is not recommended to set the LD_LIBRARY_PATH environment variable. If necessary, add the /usr/lib64 directory in the format of LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH. |
| CUDA_MPS_ACTIVE_THREAD_PERCENTAGE | MPS computing power isolation settings (assigned by the scheduler) |
| CUDA_MPS_LOG_DIRECTORY | MPS log path |
| CUDA_MPS_PIPE_DIRECTORY | Communication address for MPS SERVER |
| CGPUX_XXX | Environment variables starting with CGPU: Used to run memory & computing power isolation functions (e.g., CGPU0_PRIORITY, CGPU0_SHAREMODE) |
| CGPU_COUNT | Number of devices |
| SGPU_DISABLE | Flag indicating whether to use GPU virtualization (for isolation-optimized type) |
- When building an image, avoid directly saving a GPU container running in the cluster as an image. This method includes environment variables injected by the CCE GPU Manager component, potentially causing unexpected behavior or making virtualization features unavailable.
