Remove unused loadSaver interface

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2023-08-25 16:11:24 +02:00
parent 49dbae5c32
commit 73749285d5
8 changed files with 0 additions and 57 deletions

View File

@ -17,8 +17,6 @@ const (
driverPath = "/run/nvidia/driver" driverPath = "/run/nvidia/driver"
) )
var defaultPaths = [...]string{}
// HookConfig : options for the nvidia-container-runtime-hook. // HookConfig : options for the nvidia-container-runtime-hook.
type HookConfig config.Config type HookConfig config.Config

View File

@ -28,11 +28,6 @@ import (
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
type loadSaver interface {
Load() (spec.Interface, error)
Save(spec.Interface) error
}
type command struct { type command struct {
logger logger.Interface logger logger.Interface
} }

View File

@ -16,15 +16,6 @@
package dxcore 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 // dxcore stores a reference the dxcore dynamic library
var dxcore *context var dxcore *context

View File

@ -28,12 +28,6 @@ import (
"github.com/container-orchestrated-devices/container-device-interface/pkg/parser" "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 // 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 // CDI specifications available on the system. The NVIDIA_VISIBLE_DEVICES enviroment variable is
// used to select the devices to include. // used to select the devices to include.

View File

@ -22,7 +22,6 @@ import (
"github.com/NVIDIA/nvidia-container-toolkit/internal/config" "github.com/NVIDIA/nvidia-container-toolkit/internal/config"
"github.com/NVIDIA/nvidia-container-toolkit/internal/config/image" "github.com/NVIDIA/nvidia-container-toolkit/internal/config/image"
"github.com/NVIDIA/nvidia-container-toolkit/internal/cuda" "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/logger"
"github.com/NVIDIA/nvidia-container-toolkit/internal/modifier/cdi" "github.com/NVIDIA/nvidia-container-toolkit/internal/modifier/cdi"
"github.com/NVIDIA/nvidia-container-toolkit/internal/oci" "github.com/NVIDIA/nvidia-container-toolkit/internal/oci"
@ -31,12 +30,6 @@ import (
"github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi" "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 ( const (
visibleDevicesEnvvar = "NVIDIA_VISIBLE_DEVICES" visibleDevicesEnvvar = "NVIDIA_VISIBLE_DEVICES"
visibleDevicesVoid = "void" visibleDevicesVoid = "void"

View File

@ -16,8 +16,6 @@
package constraints package constraints
import "fmt"
const ( const (
equal = "=" equal = "="
notEqual = "!=" notEqual = "!="
@ -37,15 +35,3 @@ func (c always) Assert() error {
func (c always) String() string { func (c always) String() string {
return "true" 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)
}

View File

@ -90,7 +90,6 @@ func TestUpdateV2ConfigDefaultRuntime(t *testing.T) {
func TestUpdateV2Config(t *testing.T) { func TestUpdateV2Config(t *testing.T) {
const runtimeDir = "/test/runtime/dir" const runtimeDir = "/test/runtime/dir"
const expectedVersion = int64(2)
testCases := []struct { testCases := []struct {
runtimeName string runtimeName string

View File

@ -82,16 +82,3 @@ func newRuntimeInstaller(source string, target executableTarget, env map[string]
return &r 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")
}