Skip to content
Closed
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
10 changes: 0 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/docker/model-runner/pkg/inference/config"
"github.com/docker/model-runner/pkg/inference/models"
"github.com/docker/model-runner/pkg/logging"
dmrlogs "github.com/docker/model-runner/pkg/logs"
"github.com/docker/model-runner/pkg/metrics"
"github.com/docker/model-runner/pkg/routing"
modeltls "github.com/docker/model-runner/pkg/tls"
Expand Down Expand Up @@ -166,15 +165,6 @@ func main() {
}
})

// Logs endpoint (Docker Desktop mode only).
if logDir := envconfig.LogDir(); logDir != "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to make this work with remote/manual contexts, too.

r.HandleFunc(
"GET /logs",
dmrlogs.NewHTTPHandler(logDir),
)
log.Info("Logs endpoint enabled at /logs", "dir", logDir)
}

// Metrics endpoint
if !envconfig.DisableMetrics() {
metricsHandler := metrics.NewAggregatedMetricsHandler(
Expand Down
7 changes: 0 additions & 7 deletions pkg/envconfig/envconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,6 @@ func VLLMMetalServerPath() string {
return Var("VLLM_METAL_SERVER_PATH")
}

// LogDir returns the directory containing DMR log files.
// Configured via MODEL_RUNNER_LOG_DIR; set by Docker Desktop when
// it manages DMR. When empty, the /logs API endpoint is disabled.
func LogDir() string {
return Var("MODEL_RUNNER_LOG_DIR")
}

// DisableMetrics is true when DISABLE_METRICS is set to a truthy value (e.g. "1").
var DisableMetrics = Bool("DISABLE_METRICS")

Expand Down
Loading