From 2bc0f45a526fbd1c52baa2432429fdce45af4d43 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Sun, 11 Jun 2023 11:38:22 +0200 Subject: [PATCH] Remove unused constants and variables Signed-off-by: Evan Lezar --- tools/container/containerd/containerd.go | 11 ----------- tools/container/docker/docker.go | 8 +------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/tools/container/containerd/containerd.go b/tools/container/containerd/containerd.go index d0a3670e..a7c2615c 100644 --- a/tools/container/containerd/containerd.go +++ b/tools/container/containerd/containerd.go @@ -31,11 +31,6 @@ import ( ) const ( - nvidiaRuntimeName = "nvidia" - nvidiaRuntimeBinary = "nvidia-container-runtime" - nvidiaExperimentalRuntimeName = "nvidia-experimental" - nvidiaExperimentalRuntimeBinary = "nvidia-container-runtime.experimental" - defaultConfig = "/etc/containerd/config.toml" defaultSocket = "/run/containerd/containerd.sock" defaultRuntimeClass = "nvidia" @@ -50,12 +45,6 @@ const ( socketMessageToGetPID = "" ) -// nvidiaRuntimeBinaries defines a map of runtime names to binary names -var nvidiaRuntimeBinaries = map[string]string{ - nvidiaRuntimeName: nvidiaRuntimeBinary, - nvidiaExperimentalRuntimeName: nvidiaExperimentalRuntimeBinary, -} - // options stores the configuration from the command line or environment variables type options struct { container.Options diff --git a/tools/container/docker/docker.go b/tools/container/docker/docker.go index ddd32af4..9a482e1d 100644 --- a/tools/container/docker/docker.go +++ b/tools/container/docker/docker.go @@ -31,23 +31,17 @@ import ( ) const ( - nvidiaRuntimeName = "nvidia" - nvidiaRuntimeBinary = "nvidia-container-runtime" - nvidiaExperimentalRuntimeName = "nvidia-experimental" - nvidiaExperimentalRuntimeBinary = "nvidia-container-runtime.experimental" - defaultConfig = "/etc/docker/daemon.json" defaultSocket = "/var/run/docker.sock" defaultSetAsDefault = true // defaultRuntimeName specifies the NVIDIA runtime to be use as the default runtime if setting the default runtime is enabled - defaultRuntimeName = nvidiaRuntimeName + defaultRuntimeName = "nvidia" defaultRestartMode = "signal" defaultHostRootMount = "/host" reloadBackoff = 5 * time.Second maxReloadAttempts = 6 - defaultDockerRuntime = "runc" socketMessageToGetPID = "GET /info HTTP/1.0\r\n\r\n" )