Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#### Broadcaster

#### Orchestrator
- \#3693 Forward `HF_TOKEN` env var (for huggingface) to runner container on spawn (@hjpotter92)
- \#3693 Better hostname for runner container to distinguish when multiple containers are running on same host (@hjpotter92)

#### Transcoder

Expand Down
9 changes: 7 additions & 2 deletions ai/worker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"io"
"log/slog"
"os"
"regexp"
"runtime/debug"
"strings"
Expand Down Expand Up @@ -369,10 +370,14 @@ func (m *DockerManager) createContainer(ctx context.Context, pipeline string, mo
if m.verboseLogs {
envVars = append(envVars, "VERBOSE_LOGGING=1")
}
if token, ok := os.LookupEnv("HF_TOKEN"); ok {
envVars = append(envVars, token)
}

containerConfig := &container.Config{
Image: containerImage,
Env: envVars,
Hostname: containerName,
Image: containerImage,
Env: envVars,
Volumes: map[string]struct{}{
containerModelDir: {},
},
Expand Down
Loading