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 26, 2024
1 parent 2dc84d1 commit d081a02
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 @@ -71,6 +71,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"`
// 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 @@ -158,6 +160,10 @@ func (command *Evaluate) Initialize(args []string) (evaluationContext *evaluate.
}
evaluationContext.Runs = command.Runs

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

evaluationContext.NoDisqualification = command.NoDisqualification
}

Expand Down Expand Up @@ -483,7 +489,7 @@ func (command *Evaluate) dockerRuntime(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 d081a02

Please sign in to comment.