Skip to content

Commit e8ecfe4

Browse files
Adding NIM_MODEL_PROFILE for the input buildable profile (#566)
Signed-off-by: Vishesh Tanksale <vtanksale@nvidia.com>
1 parent 4d8670d commit e8ecfe4

File tree

2 files changed

+430
-2
lines changed

2 files changed

+430
-2
lines changed

internal/controller/nimbuild_controller.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ func (r *NIMBuildReconciler) updateNIMBuildStatus(ctx context.Context, nimBuild
512512
return nil
513513
}
514514

515-
func (r *NIMBuildReconciler) constructEngineBuildPod(nimBuild *appsv1alpha1.NIMBuild, nimCache *appsv1alpha1.NIMCache, platformType k8sutil.OrchestratorType, nimProfile appsv1alpha1.NIMProfile) (*corev1.Pod, error) {
515+
func (r *NIMBuildReconciler) constructEngineBuildPod(nimBuild *appsv1alpha1.NIMBuild, nimCache *appsv1alpha1.NIMCache, platformType k8sutil.OrchestratorType, inputNimProfile appsv1alpha1.NIMProfile) (*corev1.Pod, error) {
516516
logger := r.GetLogger()
517517
pvcName := shared.GetPVCName(nimCache, nimCache.Spec.Storage.PVC)
518518
labels := map[string]string{
@@ -533,7 +533,7 @@ func (r *NIMBuildReconciler) constructEngineBuildPod(nimBuild *appsv1alpha1.NIMB
533533
}
534534

535535
// Get tensorParallelism from the profile
536-
tensorParallelism, err := utils.GetTensorParallelismByProfileTags(nimProfile.Config)
536+
tensorParallelism, err := utils.GetTensorParallelismByProfileTags(inputNimProfile.Config)
537537
if err != nil {
538538
logger.Error(err, "Failed to retrieve tensorParallelism")
539539
return nil, err
@@ -636,6 +636,10 @@ func (r *NIMBuildReconciler) constructEngineBuildPod(nimBuild *appsv1alpha1.NIMB
636636
Name: "NIM_CUSTOM_MODEL_NAME",
637637
Value: nimBuild.GetModelName(),
638638
},
639+
{
640+
Name: "NIM_MODEL_PROFILE",
641+
Value: inputNimProfile.Name,
642+
},
639643
{
640644
Name: "NGC_API_KEY",
641645
ValueFrom: &corev1.EnvVarSource{

0 commit comments

Comments
 (0)