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 59d71bd commit 33d021d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 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,11 @@ 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")
}

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

0 comments on commit 33d021d

Please sign in to comment.