feat(backends): install from local path (#5962)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-08-03 14:24:50 +02:00
committed by GitHub
parent 3d8ec72dbf
commit a35a701052
5 changed files with 43 additions and 66 deletions

View File

@@ -144,6 +144,11 @@ func (u URI) LooksLikeHTTPURL() bool {
strings.HasPrefix(string(u), HTTPSPrefix)
}
func (u URI) LooksLikeDir() bool {
f, err := os.Stat(string(u))
return err == nil && f.IsDir()
}
func (s URI) LooksLikeOCI() bool {
return strings.HasPrefix(string(s), "quay.io") ||
strings.HasPrefix(string(s), OCIPrefix) ||