added GPU compatability
This commit is contained in:
@@ -37,7 +37,7 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
fmt.Sscanf(Ports, "%d", &PortsInt)
|
||||
}
|
||||
|
||||
imageRes, err := client.StartContainer(IpAddress,PortsInt)
|
||||
imageRes, err := client.StartContainer(IpAddress,PortsInt,GPU)
|
||||
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
|
||||
10
cmd/flags.go
10
cmd/flags.go
@@ -4,12 +4,14 @@ import (
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Variables declared for CLI
|
||||
var (
|
||||
IpAddress string
|
||||
Ports string
|
||||
Mode string
|
||||
GPU bool
|
||||
ListServers bool
|
||||
)
|
||||
var ListServers bool
|
||||
|
||||
var AppConfigFlags = []cli.Flag{
|
||||
// Deprecated to be implemented using GRPC
|
||||
@@ -38,4 +40,10 @@ var AppConfigFlags = []cli.Flag{
|
||||
EnvVars: []string{"NUM_PORTS"},
|
||||
Destination: &Ports,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "GPU",
|
||||
Usage: "Create Docker Containers to access GPU",
|
||||
EnvVars: []string{"USE_GPU"},
|
||||
Destination: &GPU,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user