Skip to content

Commit

Permalink
support -e for cog run
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 6b0ccfe commit 3d7aa58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func newRunCommand() *cobra.Command {

// This is called `publish` for consistency with `docker run`
cmd.Flags().StringArrayVarP(&runPorts, "publish", "p", []string{}, "Publish a container's port to the host, e.g. -p 8000")
cmd.Flags().StringArrayVarP(&envFlags, "env", "e", []string{}, "Environment variables, in the form name=value")

flags.SetInterspersed(false)

Expand All @@ -55,6 +56,7 @@ func run(cmd *cobra.Command, args []string) error {

runOptions := docker.RunOptions{
Args: args,
Env: envFlags,
GPUs: gpus,
Image: imageName,
Volumes: []docker.Volume{{Source: projectDir, Destination: "/src"}},
Expand Down

0 comments on commit 3d7aa58

Please sign in to comment.