mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 16:26:59 +00:00
remove tmp directories created by previous servers (#559)
* remove tmp directories created by previous servers * clean up on server stop * Update routes.go * Update server/routes.go Co-authored-by: Jeffrey Morgan <jmorganca@gmail.com> * create top-level temp ollama dir * check file exists before creating --------- Co-authored-by: Jeffrey Morgan <jmorganca@gmail.com> Co-authored-by: Michael Yang <mxyng@pm.me>
This commit is contained in:
14
llm/gguf.go
14
llm/gguf.go
@@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type containerGGUF struct {
|
||||
@@ -368,16 +367,3 @@ func (llm *ggufModel) readArray(r io.Reader) (arr []any, err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
ggufInit sync.Once
|
||||
ggufRunners []ModelRunner // a slice of ModelRunners ordered by priority
|
||||
)
|
||||
|
||||
func ggufRunner() []ModelRunner {
|
||||
ggufInit.Do(func() {
|
||||
ggufRunners = chooseRunners("gguf")
|
||||
})
|
||||
|
||||
return ggufRunners
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user