Skip to content

Commit d1b3a29

Browse files
author
localai-bot
committed
feat: pass backend image tags to InstallBackends via systemStateOpts
- Add systemStateOpts slice to pass BackendImagesReleaseTag, BackendImagesBranchTag, and BackendDevSuffix to GetSystemState - These options are now properly forwarded to the backend installation process instead of being set as environment variables
1 parent 35df82f commit d1b3a29

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

core/cli/run.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,25 @@ func (r *RunCMD) Run(ctx *cliContext.Context) error {
103103
os.MkdirAll(r.BackendsPath, 0750)
104104
os.MkdirAll(r.ModelsPath, 0750)
105105

106+
systemStateOpts := []system.SystemStateOptions{}
107+
108+
// Pass backend image fallback tags via system state
109+
if r.BackendImagesReleaseTag != "" {
110+
systemStateOpts = append(systemStateOpts, system.WithBackendImagesReleaseTag(r.BackendImagesReleaseTag))
111+
}
112+
if r.BackendImagesBranchTag != "" {
113+
systemStateOpts = append(systemStateOpts, system.WithBackendImagesBranchTag(r.BackendImagesBranchTag))
114+
}
115+
if r.BackendDevSuffix != "" {
116+
systemStateOpts = append(systemStateOpts, system.WithBackendDevSuffix(r.BackendDevSuffix))
117+
}
118+
119+
106120
systemState, err := system.GetSystemState(
107121
system.WithBackendSystemPath(r.BackendsSystemPath),
108122
system.WithModelPath(r.ModelsPath),
109123
system.WithBackendPath(r.BackendsPath),
124+
systemStateOpts...,
110125
)
111126
if err != nil {
112127
return err

0 commit comments

Comments
 (0)