mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 04:54:00 +00:00
Remove unused loadSaver interface
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
49dbae5c32
commit
73749285d5
@ -17,8 +17,6 @@ const (
|
||||
driverPath = "/run/nvidia/driver"
|
||||
)
|
||||
|
||||
var defaultPaths = [...]string{}
|
||||
|
||||
// HookConfig : options for the nvidia-container-runtime-hook.
|
||||
type HookConfig config.Config
|
||||
|
||||
|
@ -28,11 +28,6 @@ import (
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
type loadSaver interface {
|
||||
Load() (spec.Interface, error)
|
||||
Save(spec.Interface) error
|
||||
}
|
||||
|
||||
type command struct {
|
||||
logger logger.Interface
|
||||
}
|
||||
|
@ -16,15 +16,6 @@
|
||||
|
||||
package dxcore
|
||||
|
||||
import (
|
||||
"github.com/NVIDIA/go-nvml/pkg/dl"
|
||||
)
|
||||
|
||||
const (
|
||||
libraryName = "libdxcore.so"
|
||||
libraryLoadFlags = dl.RTLD_LAZY | dl.RTLD_GLOBAL
|
||||
)
|
||||
|
||||
// dxcore stores a reference the dxcore dynamic library
|
||||
var dxcore *context
|
||||
|
||||
|
@ -28,12 +28,6 @@ import (
|
||||
"github.com/container-orchestrated-devices/container-device-interface/pkg/parser"
|
||||
)
|
||||
|
||||
type cdiModifier struct {
|
||||
logger logger.Interface
|
||||
specDirs []string
|
||||
devices []string
|
||||
}
|
||||
|
||||
// NewCDIModifier creates an OCI spec modifier that determines the modifications to make based on the
|
||||
// CDI specifications available on the system. The NVIDIA_VISIBLE_DEVICES enviroment variable is
|
||||
// used to select the devices to include.
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/config"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/config/image"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/cuda"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/discover"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/logger"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/modifier/cdi"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/oci"
|
||||
@ -31,12 +30,6 @@ import (
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi"
|
||||
)
|
||||
|
||||
// csvMode represents the modifications as performed by the csv runtime mode
|
||||
type csvMode struct {
|
||||
logger logger.Interface
|
||||
discoverer discover.Discover
|
||||
}
|
||||
|
||||
const (
|
||||
visibleDevicesEnvvar = "NVIDIA_VISIBLE_DEVICES"
|
||||
visibleDevicesVoid = "void"
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
package constraints
|
||||
|
||||
import "fmt"
|
||||
|
||||
const (
|
||||
equal = "="
|
||||
notEqual = "!="
|
||||
@ -37,15 +35,3 @@ func (c always) Assert() error {
|
||||
func (c always) String() string {
|
||||
return "true"
|
||||
}
|
||||
|
||||
// invalid is an invalid constraint and can never be met
|
||||
type invalid string
|
||||
|
||||
func (c invalid) Assert() error {
|
||||
return fmt.Errorf("invalid constraint: %v", c.String())
|
||||
}
|
||||
|
||||
// String returns the string representation of the contraint
|
||||
func (c invalid) String() string {
|
||||
return string(c)
|
||||
}
|
||||
|
@ -90,7 +90,6 @@ func TestUpdateV2ConfigDefaultRuntime(t *testing.T) {
|
||||
|
||||
func TestUpdateV2Config(t *testing.T) {
|
||||
const runtimeDir = "/test/runtime/dir"
|
||||
const expectedVersion = int64(2)
|
||||
|
||||
testCases := []struct {
|
||||
runtimeName string
|
||||
|
@ -82,16 +82,3 @@ func newRuntimeInstaller(source string, target executableTarget, env map[string]
|
||||
|
||||
return &r
|
||||
}
|
||||
|
||||
func findLibraryRoot(root string) (string, error) {
|
||||
libnvidiamlPath, err := findManagementLibrary(root)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error locating NVIDIA management library: %v", err)
|
||||
}
|
||||
|
||||
return filepath.Dir(libnvidiamlPath), nil
|
||||
}
|
||||
|
||||
func findManagementLibrary(root string) (string, error) {
|
||||
return findLibrary(root, "libnvidia-ml.so")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user