mirror of
https://github.com/ollama/ollama.git
synced 2025-07-13 17:57:26 +02:00
create tempdir in models directory
the models directory should have plenty of storage and also ensure there's no cross-device copy
This commit is contained in:
committed by
Michael Yang
parent
4e535e6188
commit
88738b357b
@ -225,7 +225,7 @@ func detectModelTypeFromFiles(files map[string]string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func convertFromSafetensors(files map[string]string, baseLayers []*layerGGML, isAdapter bool, fn func(resp api.ProgressResponse)) ([]*layerGGML, error) {
|
func convertFromSafetensors(files map[string]string, baseLayers []*layerGGML, isAdapter bool, fn func(resp api.ProgressResponse)) ([]*layerGGML, error) {
|
||||||
tmpDir, err := os.MkdirTemp("", "ollama-safetensors")
|
tmpDir, err := os.MkdirTemp(envconfig.Models(), "ollama-safetensors")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user