Skip to content

Commit

Permalink
support for -e in cog predict
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Andrews <[email protected]>
  • Loading branch information
anotherjesse committed Aug 9, 2023
1 parent 6e2bba7 commit 6b0ccfe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cli/predict.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
)

var (
envFlags []string
inputFlags []string
outPath string
)
Expand All @@ -49,6 +50,7 @@ the prediction on that.`,

cmd.Flags().StringArrayVarP(&inputFlags, "input", "i", []string{}, "Inputs, in the form name=value. if value is prefixed with @, then it is read from a file on disk. E.g. -i [email protected]")
cmd.Flags().StringVarP(&outPath, "output", "o", "", "Output path")
cmd.Flags().StringArrayVarP(&envFlags, "env", "e", []string{}, "Environment variables, in the form name=value")

return cmd
}
Expand Down Expand Up @@ -110,6 +112,7 @@ func cmdPredict(cmd *cobra.Command, args []string) error {
GPUs: gpus,
Image: imageName,
Volumes: volumes,
Env: envFlags,
})

go func() {
Expand Down

0 comments on commit 6b0ccfe

Please sign in to comment.