diff --git a/Dockerfile b/Dockerfile index 840391820..f0800c3b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.24.2 +ARG GO_VERSION=1.24 ARG LLAMA_SERVER_VERSION=latest ARG LLAMA_SERVER_VARIANT=cpu ARG TARGETARCH=${BUILDARCH} diff --git a/README.md b/README.md index 667bfb8de..cd94ae331 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ When making changes to either component: ### Additional Resources - [Model Runner Documentation](https://docs.docker.com/desktop/features/model-runner/) -- [Model CLI README](https://github.com/docker/model-cli/blob/main/README.md) +- [Model CLI README](https://github.com/docker/model-runner/cmd/cli/blob/main/README.md) - [Model Specification](https://github.com/docker/model-spec/blob/main/spec.md) - [Community Slack Channel](https://app.slack.com/client/T0JK1PCN6/C09H9P5E57B) diff --git a/cmd/cli/Makefile b/cmd/cli/Makefile index f102fc933..b7e8fa9ee 100644 --- a/cmd/cli/Makefile +++ b/cmd/cli/Makefile @@ -36,11 +36,11 @@ release: exit 1; \ fi @echo "Building release version '$(VERSION)'..." - GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 CGO_CFLAGS="$(MACOS_MIN_VERSION_LDFLAG)" CGO_LDFLAGS="$(MACOS_MIN_VERSION_LDFLAG)" go build -trimpath -ldflags="-s -w -X github.com/docker/model-cli/desktop.Version=$(VERSION)" -o dist/darwin-arm64/$(PLUGIN_NAME) . - GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-cli/desktop.Version=$(VERSION)" -o dist/windows-amd64/$(PLUGIN_NAME).exe . - GOOS=windows GOARCH=arm64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-cli/desktop.Version=$(VERSION)" -o dist/windows-arm64/$(PLUGIN_NAME).exe . - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-cli/desktop.Version=$(VERSION)" -o dist/linux-amd64/$(PLUGIN_NAME) . - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-cli/desktop.Version=$(VERSION)" -o dist/linux-arm64/$(PLUGIN_NAME) . + GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 CGO_CFLAGS="$(MACOS_MIN_VERSION_LDFLAG)" CGO_LDFLAGS="$(MACOS_MIN_VERSION_LDFLAG)" go build -trimpath -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(VERSION)" -o dist/darwin-arm64/$(PLUGIN_NAME) . + GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(VERSION)" -o dist/windows-amd64/$(PLUGIN_NAME).exe . + GOOS=windows GOARCH=arm64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(VERSION)" -o dist/windows-arm64/$(PLUGIN_NAME).exe . + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(VERSION)" -o dist/linux-amd64/$(PLUGIN_NAME) . + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(VERSION)" -o dist/linux-arm64/$(PLUGIN_NAME) . @echo "Release build complete: $(PLUGIN_NAME) version '$(VERSION)'" ce-release: @@ -52,7 +52,7 @@ ce-release: echo "Warning: This release target is designed for Linux"; \ fi @echo "Building local release version '$(VERSION)'..." - CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w -X github.com/docker/model-cli/desktop.Version=$(VERSION)" -o dist/$(PLUGIN_NAME) . + CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(VERSION)" -o dist/$(PLUGIN_NAME) . @echo "Local release build complete: $(PLUGIN_NAME) version '$(VERSION)'" mock: diff --git a/cmd/cli/commands/completion/functions.go b/cmd/cli/commands/completion/functions.go index 3c69375bf..2930c0223 100644 --- a/cmd/cli/commands/completion/functions.go +++ b/cmd/cli/commands/completion/functions.go @@ -3,7 +3,7 @@ package completion import ( "strings" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/compose.go b/cmd/cli/commands/compose.go index 6045eb964..1a6d221fd 100644 --- a/cmd/cli/commands/compose.go +++ b/cmd/cli/commands/compose.go @@ -7,10 +7,10 @@ import ( "slices" "strings" - "github.com/docker/model-cli/pkg/types" + "github.com/docker/model-runner/cmd/cli/pkg/types" "github.com/spf13/pflag" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/docker/model-runner/pkg/inference/backends/llamacpp" dmrm "github.com/docker/model-runner/pkg/inference/models" "github.com/docker/model-runner/pkg/inference/scheduling" diff --git a/cmd/cli/commands/configure.go b/cmd/cli/commands/configure.go index 90b0ad4fe..6f86568f6 100644 --- a/cmd/cli/commands/configure.go +++ b/cmd/cli/commands/configure.go @@ -3,7 +3,7 @@ package commands import ( "fmt" - "github.com/docker/model-cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/commands/completion" "github.com/docker/model-runner/pkg/inference/scheduling" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/df.go b/cmd/cli/commands/df.go index c583c299f..8d6f98126 100644 --- a/cmd/cli/commands/df.go +++ b/cmd/cli/commands/df.go @@ -4,8 +4,8 @@ import ( "bytes" "github.com/docker/go-units" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/inspect.go b/cmd/cli/commands/inspect.go index 8f1e81a6d..1a40139f3 100644 --- a/cmd/cli/commands/inspect.go +++ b/cmd/cli/commands/inspect.go @@ -3,9 +3,9 @@ package commands import ( "fmt" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/commands/formatter" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/commands/formatter" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/install-runner.go b/cmd/cli/commands/install-runner.go index 2cb9239eb..6878e3164 100644 --- a/cmd/cli/commands/install-runner.go +++ b/cmd/cli/commands/install-runner.go @@ -4,15 +4,15 @@ import ( "context" "errors" "fmt" - "github.com/docker/model-cli/pkg/types" + "github.com/docker/model-runner/cmd/cli/pkg/types" "os" "time" "github.com/docker/docker/api/types/container" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" - gpupkg "github.com/docker/model-cli/pkg/gpu" - "github.com/docker/model-cli/pkg/standalone" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" + gpupkg "github.com/docker/model-runner/cmd/cli/pkg/gpu" + "github.com/docker/model-runner/cmd/cli/pkg/standalone" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/list.go b/cmd/cli/commands/list.go index db873a85b..cf984bfbc 100644 --- a/cmd/cli/commands/list.go +++ b/cmd/cli/commands/list.go @@ -9,10 +9,10 @@ import ( "time" "github.com/docker/go-units" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/commands/formatter" - "github.com/docker/model-cli/desktop" - "github.com/docker/model-cli/pkg/standalone" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/commands/formatter" + "github.com/docker/model-runner/cmd/cli/desktop" + "github.com/docker/model-runner/cmd/cli/pkg/standalone" dmrm "github.com/docker/model-runner/pkg/inference/models" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" diff --git a/cmd/cli/commands/logs.go b/cmd/cli/commands/logs.go index 7513a9ff7..5788dd1c1 100644 --- a/cmd/cli/commands/logs.go +++ b/cmd/cli/commands/logs.go @@ -5,7 +5,7 @@ import ( "context" "errors" "fmt" - "github.com/docker/model-cli/pkg/types" + "github.com/docker/model-runner/cmd/cli/pkg/types" "io" "os" "os/signal" @@ -16,9 +16,9 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/stdcopy" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" - "github.com/docker/model-cli/pkg/standalone" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" + "github.com/docker/model-runner/cmd/cli/pkg/standalone" "github.com/nxadm/tail" "github.com/spf13/cobra" "golang.org/x/sync/errgroup" diff --git a/cmd/cli/commands/package.go b/cmd/cli/commands/package.go index d9a41c6b0..61ef9897c 100644 --- a/cmd/cli/commands/package.go +++ b/cmd/cli/commands/package.go @@ -16,8 +16,8 @@ import ( "github.com/google/go-containerregistry/pkg/name" "github.com/spf13/cobra" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" ) func newPackagedCmd() *cobra.Command { diff --git a/cmd/cli/commands/ps.go b/cmd/cli/commands/ps.go index 293e0b8bb..775b73761 100644 --- a/cmd/cli/commands/ps.go +++ b/cmd/cli/commands/ps.go @@ -6,8 +6,8 @@ import ( "time" "github.com/docker/go-units" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/pull.go b/cmd/cli/commands/pull.go index a85f20248..c311a747c 100644 --- a/cmd/cli/commands/pull.go +++ b/cmd/cli/commands/pull.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/mattn/go-isatty" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/push.go b/cmd/cli/commands/push.go index ed94f1a6d..4aa83c2cc 100644 --- a/cmd/cli/commands/push.go +++ b/cmd/cli/commands/push.go @@ -3,8 +3,8 @@ package commands import ( "fmt" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/requests.go b/cmd/cli/commands/requests.go index c4af27959..921d59126 100644 --- a/cmd/cli/commands/requests.go +++ b/cmd/cli/commands/requests.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/docker/model-cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/commands/completion" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/rm.go b/cmd/cli/commands/rm.go index 95159fb29..a02b1be0b 100644 --- a/cmd/cli/commands/rm.go +++ b/cmd/cli/commands/rm.go @@ -3,7 +3,7 @@ package commands import ( "fmt" - "github.com/docker/model-cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/commands/completion" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/root.go b/cmd/cli/commands/root.go index 5b0646d2f..cd9833df9 100644 --- a/cmd/cli/commands/root.go +++ b/cmd/cli/commands/root.go @@ -6,7 +6,7 @@ import ( "github.com/docker/cli/cli-plugins/plugin" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/flags" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/run.go b/cmd/cli/commands/run.go index 42f7f744a..a3e672f7e 100644 --- a/cmd/cli/commands/run.go +++ b/cmd/cli/commands/run.go @@ -9,8 +9,8 @@ import ( "strings" "github.com/charmbracelet/glamour" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/fatih/color" "github.com/spf13/cobra" "golang.org/x/term" diff --git a/cmd/cli/commands/status.go b/cmd/cli/commands/status.go index a2bff45f0..cd4a9155f 100644 --- a/cmd/cli/commands/status.go +++ b/cmd/cli/commands/status.go @@ -3,12 +3,12 @@ package commands import ( "encoding/json" "fmt" - "github.com/docker/model-cli/pkg/types" + "github.com/docker/model-runner/cmd/cli/pkg/types" "os" "github.com/docker/cli/cli-plugins/hooks" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/status_test.go b/cmd/cli/commands/status_test.go index 0bbf4580c..9a062c553 100644 --- a/cmd/cli/commands/status_test.go +++ b/cmd/cli/commands/status_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/docker/cli/cli-plugins/hooks" - "github.com/docker/model-cli/desktop" - mockdesktop "github.com/docker/model-cli/mocks" + "github.com/docker/model-runner/cmd/cli/desktop" + mockdesktop "github.com/docker/model-runner/cmd/cli/mocks" "github.com/docker/model-runner/pkg/inference" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" diff --git a/cmd/cli/commands/tag.go b/cmd/cli/commands/tag.go index 9396e89fd..4cf08663c 100644 --- a/cmd/cli/commands/tag.go +++ b/cmd/cli/commands/tag.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/google/go-containerregistry/pkg/name" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/uninstall-runner.go b/cmd/cli/commands/uninstall-runner.go index a11f11c69..092e5d69f 100644 --- a/cmd/cli/commands/uninstall-runner.go +++ b/cmd/cli/commands/uninstall-runner.go @@ -2,11 +2,11 @@ package commands import ( "fmt" - "github.com/docker/model-cli/pkg/types" + "github.com/docker/model-runner/cmd/cli/pkg/types" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" - "github.com/docker/model-cli/pkg/standalone" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" + "github.com/docker/model-runner/cmd/cli/pkg/standalone" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/unload.go b/cmd/cli/commands/unload.go index 97f3faa80..11fd85fda 100644 --- a/cmd/cli/commands/unload.go +++ b/cmd/cli/commands/unload.go @@ -3,8 +3,8 @@ package commands import ( "fmt" - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/spf13/cobra" ) diff --git a/cmd/cli/commands/utils.go b/cmd/cli/commands/utils.go index 283faccd3..46c4b5063 100644 --- a/cmd/cli/commands/utils.go +++ b/cmd/cli/commands/utils.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/docker/cli/cli-plugins/hooks" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/pkg/errors" ) diff --git a/cmd/cli/commands/version.go b/cmd/cli/commands/version.go index bb20e733b..f1467684b 100644 --- a/cmd/cli/commands/version.go +++ b/cmd/cli/commands/version.go @@ -1,8 +1,8 @@ package commands import ( - "github.com/docker/model-cli/commands/completion" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands/completion" + "github.com/docker/model-runner/cmd/cli/desktop" "github.com/spf13/cobra" ) diff --git a/cmd/cli/desktop/context.go b/cmd/cli/desktop/context.go index ddfd411bb..d3ff0c5b0 100644 --- a/cmd/cli/desktop/context.go +++ b/cmd/cli/desktop/context.go @@ -14,8 +14,8 @@ import ( "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/context/docker" clientpkg "github.com/docker/docker/client" - "github.com/docker/model-cli/pkg/standalone" - "github.com/docker/model-cli/pkg/types" + "github.com/docker/model-runner/cmd/cli/pkg/standalone" + "github.com/docker/model-runner/cmd/cli/pkg/types" "github.com/docker/model-runner/pkg/inference" ) diff --git a/cmd/cli/desktop/desktop_test.go b/cmd/cli/desktop/desktop_test.go index 60293ba92..e5ab6a2b0 100644 --- a/cmd/cli/desktop/desktop_test.go +++ b/cmd/cli/desktop/desktop_test.go @@ -7,7 +7,7 @@ import ( "net/http" "testing" - mockdesktop "github.com/docker/model-cli/mocks" + mockdesktop "github.com/docker/model-runner/cmd/cli/mocks" "github.com/docker/model-runner/pkg/inference/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/cmd/cli/docs/generate.go b/cmd/cli/docs/generate.go index a83e51a80..fcead35f4 100644 --- a/cmd/cli/docs/generate.go +++ b/cmd/cli/docs/generate.go @@ -7,7 +7,7 @@ import ( clidocstool "github.com/docker/cli-docs-tool" "github.com/docker/cli/cli/command" - "github.com/docker/model-cli/commands" + "github.com/docker/model-runner/cmd/cli/commands" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/cmd/cli/go.mod b/cmd/cli/go.mod index 43d0e5596..b55bf4aac 100644 --- a/cmd/cli/go.mod +++ b/cmd/cli/go.mod @@ -1,8 +1,6 @@ -module github.com/docker/model-cli +module github.com/docker/model-runner/cmd/cli -go 1.24 - -toolchain go1.24.4 +go 1.24.0 require ( github.com/charmbracelet/glamour v0.10.0 diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 04c6d4fe4..e1f7be077 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -7,8 +7,8 @@ import ( "github.com/docker/cli/cli-plugins/manager" "github.com/docker/cli/cli-plugins/plugin" "github.com/docker/cli/cli/command" - "github.com/docker/model-cli/commands" - "github.com/docker/model-cli/desktop" + "github.com/docker/model-runner/cmd/cli/commands" + "github.com/docker/model-runner/cmd/cli/desktop" ) func main() { diff --git a/cmd/cli/pkg/standalone/containers.go b/cmd/cli/pkg/standalone/containers.go index 0d1153fd3..85b7538e2 100644 --- a/cmd/cli/pkg/standalone/containers.go +++ b/cmd/cli/pkg/standalone/containers.go @@ -20,8 +20,8 @@ import ( "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" "github.com/docker/go-connections/nat" - gpupkg "github.com/docker/model-cli/pkg/gpu" - "github.com/docker/model-cli/pkg/types" + gpupkg "github.com/docker/model-runner/cmd/cli/pkg/gpu" + "github.com/docker/model-runner/cmd/cli/pkg/types" ) // controllerContainerName is the name to use for the controller container. diff --git a/cmd/cli/pkg/standalone/images.go b/cmd/cli/pkg/standalone/images.go index 4fc470b60..4c9e8716e 100644 --- a/cmd/cli/pkg/standalone/images.go +++ b/cmd/cli/pkg/standalone/images.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/api/types/image" "github.com/docker/docker/client" "github.com/docker/docker/pkg/jsonmessage" - gpupkg "github.com/docker/model-cli/pkg/gpu" + gpupkg "github.com/docker/model-runner/cmd/cli/pkg/gpu" ) const ( diff --git a/go.mod b/go.mod index d195a251a..8f7a8450a 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/docker/model-runner -go 1.24 - -toolchain go1.24.4 +go 1.24.0 require ( github.com/containerd/containerd/v2 v2.0.4