Skip to content

Commit 10f1b1e

Browse files
authored
Merge pull request #196 from doringeman/go-work
chore: add go.work
2 parents 039f7a3 + d21c24a commit 10f1b1e

File tree

11 files changed

+856
-68
lines changed

11 files changed

+856
-68
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
go-version: 1.24.2
2323
cache: true
2424

25+
- name: Check go mod tidy
26+
run: |
27+
go mod tidy
28+
go mod tidy -C cmd/cli
29+
go work sync
30+
git diff --exit-code go.mod go.sum cmd/cli/go.mod cmd/cli/go.sum go.work go.work.sum
31+
2532
- name: Run tests with race detection
2633
run: go test -race ./...
2734

cmd/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ RUN apk add --no-cache make gcc musl-dev
5151
WORKDIR /src
5252
RUN --mount=target=. \
5353
--mount=target=/root/.cache,type=cache \
54-
CGO_ENABLED=1 make unit-tests
54+
CGO_ENABLED=1 make -C cmd/cli unit-tests

cmd/cli/commands/package.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
"io"
1010
"path/filepath"
1111

12-
"github.com/docker/model-distribution/builder"
13-
"github.com/docker/model-distribution/registry"
14-
"github.com/docker/model-distribution/tarball"
15-
"github.com/docker/model-distribution/types"
12+
"github.com/docker/model-runner/pkg/distribution/builder"
13+
"github.com/docker/model-runner/pkg/distribution/registry"
14+
"github.com/docker/model-runner/pkg/distribution/tarball"
15+
"github.com/docker/model-runner/pkg/distribution/types"
1616
"github.com/google/go-containerregistry/pkg/name"
1717
"github.com/spf13/cobra"
1818

cmd/cli/desktop/desktop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"time"
1616

1717
"github.com/docker/go-units"
18-
"github.com/docker/model-distribution/distribution"
18+
"github.com/docker/model-runner/pkg/distribution/distribution"
1919
"github.com/docker/model-runner/pkg/inference"
2020
dmrm "github.com/docker/model-runner/pkg/inference/models"
2121
"github.com/docker/model-runner/pkg/inference/scheduling"

cmd/cli/docker-bake.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ target "update-docs" {
4747

4848
target "validate-tests" {
4949
inherits = ["_common"]
50-
context = "cmd/cli"
50+
dockerfile = "cmd/cli/Dockerfile"
5151
target = "test"
5252
output = ["type=cacheonly"]
5353
}

cmd/cli/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ require (
1010
github.com/docker/docker v28.2.2+incompatible
1111
github.com/docker/go-connections v0.5.0
1212
github.com/docker/go-units v0.5.0
13-
github.com/docker/model-distribution v0.0.0-20250918153037-7d9fc7b72b57
14-
github.com/docker/model-runner v0.0.0-20250911130340-38bb0171c947
13+
github.com/docker/model-runner v0.0.0
1514
github.com/fatih/color v1.18.0
1615
github.com/google/go-containerregistry v0.20.6
1716
github.com/mattn/go-isatty v0.0.20
@@ -132,8 +131,9 @@ require (
132131
google.golang.org/protobuf v1.36.6 // indirect
133132
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
134133
gopkg.in/yaml.v3 v3.0.1 // indirect
135-
gotest.tools/v3 v3.5.2 // indirect
136134
howett.net/plist v1.0.1 // indirect
137135
)
138136

139137
replace github.com/kolesnikovae/go-winjob => github.com/docker/go-winjob v0.0.0-20250829235554-57b487ebcbc5
138+
139+
replace github.com/docker/model-runner => ../..

cmd/cli/go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD
110110
github.com/docker/go-winjob v0.0.0-20250829235554-57b487ebcbc5 h1:dxSFEb0EEmvceIawSFNDMrvKakRz2t+2WYpY3dFAT04=
111111
github.com/docker/go-winjob v0.0.0-20250829235554-57b487ebcbc5/go.mod h1:ICOGmIXdwhfid7rQP+tLvDJqVg0lHdEk3pI5nsapTtg=
112112
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
113-
github.com/docker/model-distribution v0.0.0-20250918153037-7d9fc7b72b57 h1:WHiPO9UmO5v97T3ksQUA2SbYVkTdUCSFobznegL97kk=
114-
github.com/docker/model-distribution v0.0.0-20250918153037-7d9fc7b72b57/go.mod h1:bV1RH2e79nTwOW38GoMU9UO8gpZVLH9+cZeEeR4wSeE=
115-
github.com/docker/model-runner v0.0.0-20250911130340-38bb0171c947 h1:6Dz1SFZONEd8tlKetn2Gu6v5HDJI/YtUFwkqHGwrsV0=
116-
github.com/docker/model-runner v0.0.0-20250911130340-38bb0171c947/go.mod h1:cl7panafjkSHllYCCGYAzty2aUvbwk55Gi35v06XL80=
117113
github.com/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM=
118114
github.com/elastic/go-sysinfo v1.15.3 h1:W+RnmhKFkqPTCRoFq2VCTmsT4p/fwpo+3gKNQsn1XU0=
119115
github.com/elastic/go-sysinfo v1.15.3/go.mod h1:K/cNrqYTDrSoMh2oDkYEMS2+a72GRxMvNP+GC+vRIlo=

go.mod

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,41 @@ module github.com/docker/model-runner
33
go 1.24.0
44

55
require (
6-
github.com/containerd/containerd/v2 v2.0.4
6+
github.com/containerd/containerd/v2 v2.1.3
77
github.com/containerd/platforms v1.0.0-rc.1
88
github.com/elastic/go-sysinfo v1.15.3
99
github.com/google/go-containerregistry v0.20.6
1010
github.com/gpustack/gguf-parser-go v0.22.1
11-
github.com/jaypipes/ghw v0.16.0
11+
github.com/jaypipes/ghw v0.17.0
1212
github.com/kolesnikovae/go-winjob v1.0.0
1313
github.com/mattn/go-shellwords v1.0.12
1414
github.com/opencontainers/go-digest v1.0.0
1515
github.com/opencontainers/image-spec v1.1.1
1616
github.com/prometheus/client_model v0.6.2
17-
github.com/prometheus/common v0.64.0
17+
github.com/prometheus/common v0.65.0
1818
github.com/sirupsen/logrus v1.9.3
1919
github.com/spf13/cobra v1.9.1
2020
github.com/stretchr/testify v1.10.0
2121
golang.org/x/sync v0.15.0
2222
)
2323

2424
require (
25-
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
2625
github.com/StackExchange/wmi v1.2.1 // indirect
2726
github.com/containerd/errdefs v1.0.0 // indirect
2827
github.com/containerd/log v0.1.0 // indirect
2928
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
29+
github.com/containerd/typeurl/v2 v2.2.3 // indirect
3030
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3131
github.com/distribution/reference v0.6.0 // indirect
32-
github.com/docker/cli v28.2.2+incompatible // indirect
32+
github.com/docker/cli v28.3.0+incompatible // indirect
3333
github.com/docker/distribution v2.8.3+incompatible // indirect
3434
github.com/docker/docker-credential-helpers v0.9.3 // indirect
3535
github.com/elastic/go-windows v1.0.2 // indirect
3636
github.com/felixge/httpsnoop v1.0.4 // indirect
3737
github.com/go-logr/logr v1.4.3 // indirect
3838
github.com/go-logr/stdr v1.2.2 // indirect
39-
github.com/go-ole/go-ole v1.2.6 // indirect
39+
github.com/go-ole/go-ole v1.3.0 // indirect
40+
github.com/gogo/protobuf v1.3.2 // indirect
4041
github.com/henvic/httpretty v0.1.4 // indirect
4142
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4243
github.com/jaypipes/pcidb v1.0.1 // indirect
@@ -54,22 +55,21 @@ require (
5455
github.com/spf13/pflag v1.0.6 // indirect
5556
github.com/vbatts/tar-split v0.12.1 // indirect
5657
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
57-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
58-
go.opentelemetry.io/otel v1.36.0 // indirect
59-
go.opentelemetry.io/otel/metric v1.36.0 // indirect
60-
go.opentelemetry.io/otel/trace v1.36.0 // indirect
61-
golang.org/x/crypto v0.37.0 // indirect
58+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
59+
go.opentelemetry.io/otel v1.37.0 // indirect
60+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
61+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
62+
golang.org/x/crypto v0.39.0 // indirect
6263
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
6364
golang.org/x/mod v0.25.0 // indirect
6465
golang.org/x/sys v0.35.0 // indirect
6566
golang.org/x/tools v0.34.0 // indirect
6667
gonum.org/v1/gonum v0.15.1 // indirect
6768
google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect
68-
google.golang.org/grpc v1.72.0 // indirect
6969
google.golang.org/protobuf v1.36.6 // indirect
7070
gopkg.in/yaml.v3 v3.0.1 // indirect
71-
gotest.tools/v3 v3.5.1 // indirect
72-
howett.net/plist v1.0.0 // indirect
71+
gotest.tools/v3 v3.5.2 // indirect
72+
howett.net/plist v1.0.1 // indirect
7373
)
7474

7575
replace github.com/kolesnikovae/go-winjob => github.com/docker/go-winjob v0.0.0-20250829235554-57b487ebcbc5

0 commit comments

Comments
 (0)