mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue