forked from docker/model-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreinstall-runner.go
More file actions
43 lines (41 loc) · 1 KB
/
reinstall-runner.go
File metadata and controls
43 lines (41 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package commands
import (
"github.com/docker/model-runner/cmd/cli/commands/completion"
"github.com/spf13/cobra"
)
func newReinstallRunner() *cobra.Command {
var port uint16
var host string
var gpuMode string
var backend string
var doNotTrack bool
var debug bool
var proxyCert string
c := &cobra.Command{
Use: "reinstall-runner",
Short: "Reinstall Docker Model Runner (Docker Engine only)",
RunE: func(cmd *cobra.Command, args []string) error {
return runInstallOrStart(cmd, runnerOptions{
port: port,
host: host,
gpuMode: gpuMode,
backend: backend,
doNotTrack: doNotTrack,
pullImage: true,
pruneContainers: true,
proxyCert: proxyCert,
}, debug)
},
ValidArgsFunction: completion.NoComplete,
}
addRunnerFlags(c, runnerFlagOptions{
Port: &port,
Host: &host,
GpuMode: &gpuMode,
Backend: &backend,
DoNotTrack: &doNotTrack,
Debug: &debug,
ProxyCert: &proxyCert,
})
return c
}