Skip to content

Commit

Permalink
add MOCK_PIPELINE env var to runner if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-astra-video committed Jun 28, 2024
1 parent a36337e commit 5cbb6cc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions worker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"log/slog"
"os"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -164,6 +165,12 @@ func (m *DockerManager) createContainer(ctx context.Context, pipeline string, mo
"PIPELINE=" + pipeline,
"MODEL_ID=" + modelID,
}
_, ok := os.LookupEnv("MOCK_PIPELINE")
if ok {
envVars = append(envVars, "MOCK_PIPELINE=true")
slog.Info("MOCK_PIPELINE set, passing to runner container")
}

for key, value := range optimizationFlags {
envVars = append(envVars, key+"="+value.String())
}
Expand Down

0 comments on commit 5cbb6cc

Please sign in to comment.