mirror of
https://github.com/mudler/LocalAI.git
synced 2025-02-20 17:32:47 +00:00
fix(paths): automatically create paths (#1650)
Especially useful when running inside a container. Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
072f71dfb7
commit
5a6fd98839
@ -216,6 +216,11 @@ func App(opts ...options.AppOption) (*fiber.App, error) {
|
||||
}{Version: internal.PrintableVersion()})
|
||||
})
|
||||
|
||||
// Make sure directories exists
|
||||
os.MkdirAll(options.ImageDir, 0755)
|
||||
os.MkdirAll(options.AudioDir, 0755)
|
||||
os.MkdirAll(options.Loader.ModelPath, 0755)
|
||||
|
||||
modelGalleryService := localai.CreateModelGalleryService(options.Galleries, options.Loader.ModelPath, galleryService)
|
||||
app.Post("/models/apply", auth, modelGalleryService.ApplyModelGalleryEndpoint())
|
||||
app.Get("/models/available", auth, modelGalleryService.ListModelFromGalleryEndpoint())
|
||||
|
Loading…
x
Reference in New Issue
Block a user