@@ -78,7 +78,7 @@ func inspectStandaloneRunner(container container.Summary) *standaloneRunner {
7878// ensureStandaloneRunnerAvailable is a utility function that other commands can
7979// use to initialize a default standalone model runner. It is a no-op in
8080// unsupported contexts or if automatic installs have been disabled.
81- func ensureStandaloneRunnerAvailable (ctx context.Context , printer standalone.StatusPrinter ) (* standaloneRunner , error ) {
81+ func ensureStandaloneRunnerAvailable (ctx context.Context , printer standalone.StatusPrinter , debug bool ) (* standaloneRunner , error ) {
8282 // If we're not in a supported model runner context, then don't do anything.
8383 engineKind := modelRunner .EngineKind ()
8484 standaloneSupported := engineKind == types .ModelRunnerEngineKindMoby ||
@@ -138,7 +138,7 @@ func ensureStandaloneRunnerAvailable(ctx context.Context, printer standalone.Sta
138138 port = standalone .DefaultControllerPortCloud
139139 environment = "cloud"
140140 }
141- if err := standalone .CreateControllerContainer (ctx , dockerClient , port , host , environment , false , gpu , "" , modelStorageVolume , printer , engineKind ); err != nil {
141+ if err := standalone .CreateControllerContainer (ctx , dockerClient , port , host , environment , false , gpu , "" , modelStorageVolume , printer , engineKind , debug ); err != nil {
142142 return nil , fmt .Errorf ("unable to initialize standalone model runner container: %w" , err )
143143 }
144144
@@ -175,7 +175,7 @@ type runnerOptions struct {
175175}
176176
177177// runInstallOrStart is shared logic for install-runner and start-runner commands
178- func runInstallOrStart (cmd * cobra.Command , opts runnerOptions ) error {
178+ func runInstallOrStart (cmd * cobra.Command , opts runnerOptions , debug bool ) error {
179179 // Ensure that we're running in a supported model runner context.
180180 engineKind := modelRunner .EngineKind ()
181181 if engineKind == types .ModelRunnerEngineKindDesktop {
@@ -282,7 +282,7 @@ func runInstallOrStart(cmd *cobra.Command, opts runnerOptions) error {
282282 return fmt .Errorf ("unable to initialize standalone model storage: %w" , err )
283283 }
284284 // Create the model runner container.
285- if err := standalone .CreateControllerContainer (cmd .Context (), dockerClient , port , opts .host , environment , opts .doNotTrack , gpu , opts .backend , modelStorageVolume , asPrinter (cmd ), engineKind ); err != nil {
285+ if err := standalone .CreateControllerContainer (cmd .Context (), dockerClient , port , opts .host , environment , opts .doNotTrack , gpu , opts .backend , modelStorageVolume , asPrinter (cmd ), engineKind , debug ); err != nil {
286286 return fmt .Errorf ("unable to initialize standalone model runner container: %w" , err )
287287 }
288288
@@ -296,6 +296,7 @@ func newInstallRunner() *cobra.Command {
296296 var gpuMode string
297297 var backend string
298298 var doNotTrack bool
299+ var debug bool
299300 c := & cobra.Command {
300301 Use : "install-runner" ,
301302 Short : "Install Docker Model Runner (Docker Engine only)" ,
@@ -308,7 +309,7 @@ func newInstallRunner() *cobra.Command {
308309 doNotTrack : doNotTrack ,
309310 pullImage : true ,
310311 pruneContainers : false ,
311- })
312+ }, debug )
312313 },
313314 ValidArgsFunction : completion .NoComplete ,
314315 }
@@ -318,5 +319,6 @@ func newInstallRunner() *cobra.Command {
318319 c .Flags ().StringVar (& gpuMode , "gpu" , "auto" , "Specify GPU support (none|auto|cuda|rocm|musa|cann)" )
319320 c .Flags ().StringVar (& backend , "backend" , "" , backendUsage )
320321 c .Flags ().BoolVar (& doNotTrack , "do-not-track" , false , "Do not track models usage in Docker Model Runner" )
322+ c .Flags ().BoolVar (& debug , "debug" , false , "Enable debug logging" )
321323 return c
322324}
0 commit comments