Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions cmd/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ package cmd
import (
"context"
"fmt"
"time"

"github.com/briandowns/spinner"
"github.com/spf13/cobra"
"github.com/spf13/viper"

Expand Down Expand Up @@ -80,21 +78,5 @@ func runAttach(ctx context.Context, filepath string) error {

fmt.Printf("Successfully attached model artifact: %s\n", attachConfig.Target)

// nydusify the model artifact if needed.
if attachConfig.Nydusify {
sp := spinner.New(spinner.CharSets[39], 100*time.Millisecond, spinner.WithSuffix("Nydusifying..."))
sp.Start()
defer sp.Stop()

nydusName, err := b.Nydusify(ctx, attachConfig.Target)
if err != nil {
err = fmt.Errorf("failed to nydusify %s: %w", attachConfig.Target, err)
sp.FinalMSG = err.Error()
return err
}

sp.FinalMSG = fmt.Sprintf("Successfully nydusify model artifact: %s", nydusName)
}

return nil
}
18 changes: 0 additions & 18 deletions cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ package cmd
import (
"context"
"fmt"
"time"

"github.com/CloudNativeAI/modctl/pkg/backend"
"github.com/CloudNativeAI/modctl/pkg/config"
"github.com/briandowns/spinner"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -82,21 +80,5 @@ func runBuild(ctx context.Context, workDir string) error {

fmt.Printf("Successfully built model artifact: %s\n", buildConfig.Target)

// nydusify the model artifact if needed.
if buildConfig.Nydusify {
sp := spinner.New(spinner.CharSets[39], 100*time.Millisecond, spinner.WithSuffix("Nydusifying..."))
sp.Start()
defer sp.Stop()

nydusName, err := b.Nydusify(ctx, buildConfig.Target)
if err != nil {
err = fmt.Errorf("failed to nydusify %s: %w", buildConfig.Target, err)
sp.FinalMSG = err.Error()
return err
}

sp.FinalMSG = fmt.Sprintf("Successfully nydusify model artifact: %s", nydusName)
}

return nil
}
18 changes: 0 additions & 18 deletions cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ package cmd
import (
"context"
"fmt"
"time"

"github.com/CloudNativeAI/modctl/pkg/backend"
"github.com/CloudNativeAI/modctl/pkg/config"

"github.com/briandowns/spinner"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -75,21 +73,5 @@ func runPush(ctx context.Context, target string) error {

fmt.Printf("Successfully pushed model artifact: %s\n", target)

// nydusify the model artifact if needed.
if pushConfig.Nydusify {
sp := spinner.New(spinner.CharSets[39], 100*time.Millisecond, spinner.WithSuffix("Nydusifying..."))
sp.Start()
defer sp.Stop()

nydusName, err := b.Nydusify(ctx, target)
if err != nil {
err = fmt.Errorf("failed to nydusify %s: %w", target, err)
sp.FinalMSG = err.Error()
return err
}

sp.FinalMSG = fmt.Sprintf("Successfully nydusify model artifact: %s", nydusName)
}

return nil
}
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/CloudNativeAI/model-spec v0.0.6
github.com/antgroup/hugescm v0.18.3
github.com/avast/retry-go/v4 v4.6.1
github.com/briandowns/spinner v1.23.2
github.com/distribution/distribution/v3 v3.0.0
github.com/distribution/reference v0.6.0
github.com/dustin/go-humanize v1.0.1
Expand Down Expand Up @@ -46,7 +45,6 @@ require (
github.com/dgraph-io/ristretto/v2 v2.2.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/briandowns/spinner v1.23.2 h1:Zc6ecUnI+YzLmJniCfDNaMbW0Wid1d5+qcTq4L2FW8w=
github.com/briandowns/spinner v1.23.2/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
Expand Down Expand Up @@ -68,8 +66,6 @@ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8=
github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
Expand Down
4 changes: 0 additions & 4 deletions pkg/backend/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"github.com/CloudNativeAI/modctl/pkg/backend/build"
buildconfig "github.com/CloudNativeAI/modctl/pkg/backend/build/config"
"github.com/CloudNativeAI/modctl/pkg/backend/build/hooks"
"github.com/CloudNativeAI/modctl/pkg/backend/build/interceptor"
"github.com/CloudNativeAI/modctl/pkg/backend/processor"
"github.com/CloudNativeAI/modctl/pkg/backend/remote"
"github.com/CloudNativeAI/modctl/pkg/config"
Expand Down Expand Up @@ -349,9 +348,6 @@ func (b *backend) getBuilder(reference string, cfg *config.Attach) (build.Builde
build.WithPlainHTTP(cfg.PlainHTTP),
build.WithInsecure(cfg.Insecure),
}
if cfg.Nydusify {
opts = append(opts, build.WithInterceptor(interceptor.NewNydus()))
}

builder, err := build.NewBuilder(outputType, b.store, repo, tag, opts...)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions pkg/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ type Backend interface {

// Tag creates a new tag that refers to the source model artifact.
Tag(ctx context.Context, source, target string) error

// Nydusify converts the model artifact to nydus format.
Nydusify(ctx context.Context, target string) (string, error)
}

// backend is the implementation of Backend.
Expand Down
4 changes: 0 additions & 4 deletions pkg/backend/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"github.com/CloudNativeAI/modctl/pkg/backend/build"
buildconfig "github.com/CloudNativeAI/modctl/pkg/backend/build/config"
"github.com/CloudNativeAI/modctl/pkg/backend/build/hooks"
"github.com/CloudNativeAI/modctl/pkg/backend/build/interceptor"
"github.com/CloudNativeAI/modctl/pkg/backend/processor"
"github.com/CloudNativeAI/modctl/pkg/config"
"github.com/CloudNativeAI/modctl/pkg/modelfile"
Expand Down Expand Up @@ -78,9 +77,6 @@ func (b *backend) Build(ctx context.Context, modelfilePath, workDir, target stri
build.WithPlainHTTP(cfg.PlainHTTP),
build.WithInsecure(cfg.Insecure),
}
if cfg.Nydusify {
opts = append(opts, build.WithInterceptor(interceptor.NewNydus()))
}

builder, err := build.NewBuilder(outputType, b.store, repo, tag, opts...)
if err != nil {
Expand Down
181 changes: 0 additions & 181 deletions pkg/backend/build/interceptor/nydus.go

This file was deleted.

25 changes: 0 additions & 25 deletions pkg/backend/build/interceptor/nydus_test.go

This file was deleted.

Loading