Skip to content

add compose metadata subcommand to return information about model runner cli usage as a Compose provider #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

glours
Copy link
Contributor

@glours glours commented Jun 5, 2025

compose metadata subcommand will return information about parameters for up and down commands
It will let Compose know that model options is required and help Docker LSP to propose a better UX.

{
  "description": "Docker Model Runner",
  "up": {
    "parameters": [
      {
        "name": "model",
        "description": "model to use",
        "required": true,
        "type": "stringArray",
        "default": "[]"
      }
    ]
  },
  "down": {
    "parameters": null
  }
}

@glours glours force-pushed the compose-provider-metadata branch from 2e99bb1 to a749f65 Compare June 5, 2025 19:53
Copy link
Contributor

@xenoscopic xenoscopic left a comment

Choose a reason for hiding this comment

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

LGTM

@xenoscopic
Copy link
Contributor

@glours Happy to merge whenever you're ready, just let me know.

@glours
Copy link
Contributor Author

glours commented Jun 6, 2025

@xenoscopic I'll let you know, I'm waiting for Compose v2.37.0 to be available via Docker Desktop module update

@xenoscopic
Copy link
Contributor

@glours Sounds good, I'll wait for your message.

…ner cli usage as a Compose provider

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
@glours glours force-pushed the compose-provider-metadata branch from a749f65 to bb6b18a Compare June 18, 2025 11:35
@glours
Copy link
Contributor Author

glours commented Jun 18, 2025

@xenoscopic you can merge it, could we expect a release of the cli via desktop module soon as Compose v2.37.1 will be embedded in DD patch release which should be available today IIRC (ping me in DM if needed)

@doringeman
Copy link
Collaborator

I think we can do that, @glours.
I don't think we've added any breaking change to model-cli which isn't reflected in the latest model-runner shipped with Docker Desktop, WDYT @ekcasey @ilopezluna @p1-0tr @xenoscopic?

@glours
Copy link
Contributor Author

glours commented Jun 18, 2025

@doringeman thanks, because there will be one on the Compose side 😅

@xenoscopic
Copy link
Contributor

Let's merge / ship it for 4.43 (we can't take it back to 4.42 because of the other stuff that's gone into Model CLI since then). I will do a new CLI release today, 0.1.30, to fix the install-runner race issue, so I can fold this into that.

Comment on lines -102 to -110
var model []string
c := &cobra.Command{
Use: "down",
RunE: func(cmd *cobra.Command, args []string) error {
// No required cleanup on down
return nil
},
}
c.Flags().StringArrayVar(&model, "model", nil, "model to use")
Copy link
Contributor

Choose a reason for hiding this comment

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

In testing, I'm seeing things fail on docker compose down:

 ✘ llama3.2                     exit status 1                                                                                                                          0.0s
 ✘ qwen3                        exit status 1                                                                                                                          0.0s
 failed to remove service provider: exit status 1

Are we sure that we should remove the model argument to down?

Copy link
Contributor

@xenoscopic xenoscopic Jun 18, 2025

Choose a reason for hiding this comment

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

If I add these two lines back, then compose down does seem to work correctly.

Copy link

Choose a reason for hiding this comment

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

Can we test this somehow in the builds?

Copy link
Contributor Author

@glours glours Jun 19, 2025

Choose a reason for hiding this comment

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

You need to use Compose v2.37.x for your test, this is link to this change docker/compose#12903
If you test with the latest Desktop version 4.42.1 you should not have the issue

@xenoscopic
Copy link
Contributor

@glours Will Compose 2.37.1 work with model providers without this change? I know this change won't work without 2.37.1, but I'm wondering if we are okay to ship without this in our Docker CE release or if we need to get this in for compatibility.

@glours
Copy link
Contributor Author

glours commented Jun 20, 2025

@xenoscopic yes if the metadata subcommand is not present, Compose will ignore this the step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants