mirror of
https://github.com/ollama/ollama.git
synced 2026-11-12 03:46:14 -06:00
Add manifest-list storage so runner-specific manifests can coexist under one tag while preserving existing v1 tags as best-effort downgrade anchors. Show/list/copy/remove/pull/push now understand runner and digest selection and transfer referenced child manifests and layers. Add lazy local compatibility migration for legacy Ollama GGUFs into llama.cpp-compatible children, covering the patched model families and preserving parser/renderer, templates, projectors, media metadata, split GGUFs, and MTP/draft tensors where applicable. Extend create/import/conversion paths for the same compatibility rules, harden manifest-list combine validation, and add focused manifest, migration, transfer, and integration coverage for first-load conversion plus chat/tools/vision/audio/embedding behavior.
15 lines
261 B
Go
15 lines
261 B
Go
//go:build !windows
|
|
|
|
package compatmigrate
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
func availableSpace(path string) (uint64, error) {
|
|
var st unix.Statfs_t
|
|
if err := unix.Statfs(path, &st); err != nil {
|
|
return 0, err
|
|
}
|
|
|
|
return st.Bavail * uint64(st.Bsize), nil
|
|
}
|