Skip to content

Commit

Permalink
Introduce "runtime-image" parameter to specify the container image to…
Browse files Browse the repository at this point in the history
… use for a different runtime

If none is specified we will always use the taged version defined within eval-dev-quality

Part of #198
  • Loading branch information
Munsio committed Jun 27, 2024
1 parent de25a43 commit c256d0d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/eval-dev-quality/cmd/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ type Evaluate struct {

// Runtime indicates if the evaluation is run locally or inside a container.
Runtime string `long:"runtime" description:"The runtime which will be used for the evaluation." default:"local" choice:"local" choice:"docker"`
// RuntimeImage determines the container image used for any container runtime.
RuntimeImage string `long:"runtime-image" description:"The container image to use for the evaluation." default:""`

// logger holds the logger of the command.
logger *log.Logger
Expand Down Expand Up @@ -142,6 +144,10 @@ func (command *Evaluate) Initialize(args []string) (evaluationContext *evaluate.
}
}

if command.RuntimeImage == "" {
command.RuntimeImage = "ghcr.io/symflower/eval-dev-quality:v" + evaluate.Version
}

evaluationContext.NoDisqualification = command.NoDisqualification
}

Expand Down Expand Up @@ -487,7 +493,7 @@ func (command *Evaluate) evaluateDocker(ctx *evaluate.Context) (err error) {
"-v", // bind volume
resultPath + ":/home/ubuntu/evaluation",
"--rm", // automatically remove container after it finished
"ghcr.io/symflower/eval-dev-quality:v0.5.0",
command.RuntimeImage,
}

// Commands for the evaluation to run inside the container.
Expand Down

0 comments on commit c256d0d

Please sign in to comment.