Skip to content

Commit

Permalink
Fix NIM env during caching (#105)
Browse files Browse the repository at this point in the history
* NGC clients will use cache as NIM_CACHE_PATH/ngc
* HF clients will use cache as NIM_CACHE_PATH/huggingface

The misconfiguration was causing cache to be invalidated

Signed-off-by: Shiva Krishna, Merla <[email protected]>
  • Loading branch information
shivamerla authored Aug 27, 2024
1 parent e743d74 commit 831a268
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/controller/nimcache_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1026,15 +1026,15 @@ func constructJob(nimCache *appsv1alpha1.NIMCache) (*batchv1.Job, error) {
Env: []corev1.EnvVar{
{
Name: "HF_HOME",
Value: "/model-store", // Need to be set to a writable directory by non-root user
Value: "/model-store/huggingface",
},
{
Name: "NIM_CACHE_PATH", // Note: in the download mode, NIM_CACHE_PATH is not used
Name: "NIM_CACHE_PATH",
Value: "/model-store",
},
{
Name: "NGC_HOME", // Note: NGC_HOME is required and handled as NIM_CACHE_PATH in the download mode
Value: "/model-store",
Name: "NGC_HOME",
Value: "/model-store/ngc",
},
},
VolumeMounts: []corev1.VolumeMount{
Expand Down

0 comments on commit 831a268

Please sign in to comment.