Skip to content

Commit af8cac5

Browse files
ilopezlunandeloof
authored andcommitted
just warn user
Signed-off-by: Ignacio López Luna <[email protected]>
1 parent 8477a85 commit af8cac5

File tree

2 files changed

+4
-116
lines changed

2 files changed

+4
-116
lines changed

pkg/compose/model.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"github.com/containerd/errdefs"
3131
"github.com/docker/cli/cli-plugins/manager"
3232
"github.com/docker/compose/v5/pkg/api"
33+
"github.com/sirupsen/logrus"
3334
"github.com/spf13/cobra"
3435
"golang.org/x/sync/errgroup"
3536
)
@@ -153,23 +154,20 @@ func (m *modelAPI) PullModel(ctx context.Context, model types.ModelConfig, quiet
153154

154155
func (m *modelAPI) ConfigureModel(ctx context.Context, config types.ModelConfig, events api.EventProcessor) error {
155156
if len(config.RuntimeFlags) != 0 {
156-
return fmt.Errorf("runtime flags are not supported for model configuration")
157+
logrus.Warnf("Runtime flags are not supported and will be ignored for model %s", config.Model)
158+
config.RuntimeFlags = nil
157159
}
158160
events.On(api.Resource{
159161
ID: config.Name,
160162
Status: api.Working,
161163
Text: "Configuring",
162164
})
163-
// configure [--context-size=<n>] MODEL [-- <runtime-flags...>]
165+
// configure [--context-size=<n>] MODEL
164166
args := []string{"configure"}
165167
if config.ContextSize > 0 {
166168
args = append(args, "--context-size", strconv.Itoa(config.ContextSize))
167169
}
168170
args = append(args, config.Model)
169-
if len(config.RuntimeFlags) != 0 {
170-
args = append(args, "--")
171-
args = append(args, config.RuntimeFlags...)
172-
}
173171
cmd := exec.CommandContext(ctx, m.path, args...)
174172
err := m.prepare(ctx, cmd)
175173
if err != nil {

pkg/compose/model_test.go

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)