Move modifier code for inserting nvidia-container-runtime-hook to separate package

This change moves the code defining the insertion of the nvidia-container-runtime
hook to a separate package. This allows for better distinction between the existing
and experimental modifications.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2022-02-22 16:09:45 +02:00
parent 4177fddcc4
commit c6dfc1027d
7 changed files with 233 additions and 231 deletions

View File

@@ -11,8 +11,6 @@ import (
const (
configOverride = "XDG_CONFIG_HOME"
configFilePath = "nvidia-container-runtime/config.toml"
hookDefaultFilePath = "/usr/bin/nvidia-container-runtime-hook"
)
var (
@@ -49,7 +47,7 @@ func run(argv []string) (rerr error) {
logger.CloseFile()
}()
r, err := newRuntime(argv)
r, err := newNVIDIAContainerRuntime(logger.Logger, cfg, argv)
if err != nil {
return fmt.Errorf("error creating runtime: %v", err)
}