@@ -126,10 +126,12 @@ func ensureStandaloneRunnerAvailable(ctx context.Context, printer standalone.Sta
126126
127127 // Create the model runner container.
128128 port := uint16 (standalone .DefaultControllerPortMoby )
129+ environment := "moby"
129130 if engineKind == desktop .ModelRunnerEngineKindCloud {
130131 port = standalone .DefaultControllerPortCloud
132+ environment = "cloud"
131133 }
132- if err := standalone .CreateControllerContainer (ctx , dockerClient , port , false , gpu , modelStorageVolume , printer ); err != nil {
134+ if err := standalone .CreateControllerContainer (ctx , dockerClient , port , environment , false , gpu , modelStorageVolume , printer ); err != nil {
133135 return nil , fmt .Errorf ("unable to initialize standalone model runner container: %w" , err )
134136 }
135137
@@ -188,6 +190,12 @@ func newInstallRunner() *cobra.Command {
188190 port = standalone .DefaultControllerPortCloud
189191 }
190192
193+ // Set the appropriate environment.
194+ environment := "moby"
195+ if engineKind == desktop .ModelRunnerEngineKindCloud {
196+ environment = "cloud"
197+ }
198+
191199 // Create a Docker client for the active context.
192200 dockerClient , err := desktop .DockerClientForContext (dockerCLI , dockerCLI .CurrentContext ())
193201 if err != nil {
@@ -230,7 +238,7 @@ func newInstallRunner() *cobra.Command {
230238 return fmt .Errorf ("unable to initialize standalone model storage: %w" , err )
231239 }
232240 // Create the model runner container.
233- if err := standalone .CreateControllerContainer (cmd .Context (), dockerClient , port , doNotTrack , gpu , modelStorageVolume , cmd ); err != nil {
241+ if err := standalone .CreateControllerContainer (cmd .Context (), dockerClient , port , environment , doNotTrack , gpu , modelStorageVolume , cmd ); err != nil {
234242 return fmt .Errorf ("unable to initialize standalone model runner container: %w" , err )
235243 }
236244
0 commit comments