mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
wip: wip
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
This commit is contained in:
parent
efcfecb2db
commit
80319572cf
@ -8,8 +8,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/bmatcuk/doublestar/v4"
|
|
||||||
stereofile "github.com/anchore/stereoscope/pkg/file"
|
stereofile "github.com/anchore/stereoscope/pkg/file"
|
||||||
|
"github.com/bmatcuk/doublestar/v4"
|
||||||
|
|
||||||
"github.com/anchore/syft/syft/file"
|
"github.com/anchore/syft/syft/file"
|
||||||
)
|
)
|
||||||
@ -178,12 +178,6 @@ func (r *ociModelResolver) cleanup() error {
|
|||||||
// extractVirtualPath generates a virtual path for a GGUF layer.
|
// extractVirtualPath generates a virtual path for a GGUF layer.
|
||||||
// This simulates where the file would be in the artifact.
|
// This simulates where the file would be in the artifact.
|
||||||
func extractVirtualPath(layerIndex int, annotations map[string]string) string {
|
func extractVirtualPath(layerIndex int, annotations map[string]string) string {
|
||||||
// Check if there's a filename in annotations
|
|
||||||
if filename, ok := annotations["org.opencontainers.image.title"]; ok {
|
|
||||||
return "/" + filename
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fall back to generic name based on index
|
|
||||||
return fmt.Sprintf("/model-layer-%d.gguf", layerIndex)
|
return fmt.Sprintf("/model-layer-%d.gguf", layerIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user