Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions controllers/resources/bentorequest_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,10 @@ func GetContainerImageS3EnableStargz() bool {
return os.Getenv("CONTAINER_IMAGE_S3_ENABLE_STARGZ") == trueStr
}

func GetContainerImageModelEagerDownload() bool {
return os.Getenv("CONTAINER_IMAGE_MODEL_EAGER_DOWNLOAD") == trueStr
}

func GetContainerImageS3AccessKeyID() string {
return os.Getenv("CONTAINER_IMAGE_S3_ACCESS_KEY_ID")
}
Expand Down Expand Up @@ -2347,6 +2351,7 @@ func (r *BentoRequestReconciler) generateImageBuilderPodTemplateSpec(ctx context
containerImageS3EndpointURL := GetContainerImageS3EndpointURL()
containerImageS3Bucket := GetContainerImageS3Bucket()
containerImageS3EnableStargz := GetContainerImageS3EnableStargz()
containerImageModelEagerDownload := GetContainerImageModelEagerDownload()
containerImageS3AccessKeyID := GetContainerImageS3AccessKeyID()
containerImageS3SecretAccessKey := GetContainerImageS3SecretAccessKey()
imageStoredInS3 := isImageStoredInS3(opt.BentoRequest)
Expand Down Expand Up @@ -3165,6 +3170,9 @@ echo "Done"
if containerImageS3EnableStargz {
extraFlags += " --enable-stargz"
}
if containerImageModelEagerDownload {
extraFlags += " --model-eager-download"
}
models := make([]ModelSpec, 0, len(opt.BentoRequest.Spec.Models))
for _, model := range opt.BentoRequest.Spec.Models {
models = append(models, ModelSpec{
Expand Down
1 change: 1 addition & 0 deletions helm/yatai-image-builder/templates/secret-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ stringData:
CONTAINER_IMAGE_S3_SECRET_ACCESS_KEY: {{ .Values.global.s3.secretAccessKey | quote }}
CONTAINER_IMAGE_S3_SECURE: {{ .Values.global.s3.secure | quote }}
CONTAINER_IMAGE_S3_ENABLE_STARGZ: "false"
CONTAINER_IMAGE_MODEL_EAGER_DOWNLOAD: {{ .Values.global.modelEagerDownload | quote }}

{{- if .Values.internal.aws.accessKeyID }}
AWS_ACCESS_KEY_ID: {{ .Values.internal.aws.accessKeyID | quote }}
Expand Down
2 changes: 2 additions & 0 deletions helm/yatai-image-builder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ global:
yataiSystemNamespace: yatai-system
yataiSystemServiceAccountName: yatai

modelEagerDownload: false

internal:
disableYataiComponentRegistration: true
skipCheck: false
Expand Down
Loading