github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/devices/gpu/nvidia/cmd/main.go (about) 1 package main 2 3 import ( 4 "context" 5 6 log "github.com/hashicorp/go-hclog" 7 8 "github.com/hashicorp/nomad/devices/gpu/nvidia" 9 "github.com/hashicorp/nomad/plugins" 10 ) 11 12 func main() { 13 // Serve the plugin 14 plugins.ServeCtx(factory) 15 } 16 17 // factory returns a new instance of the Nvidia GPU plugin 18 func factory(ctx context.Context, log log.Logger) interface{} { 19 return nvidia.NewNvidiaDevice(ctx, log) 20 }