You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@which mockery > /dev/null || { echo"mockery not found. Trying to install via Homebrew...";$(MAKE) install-mockery; }
111
-
@mockery --version | grep -q "2.46.3"|| { echo"mockery version is not v2.46.3. Trying to install the correct version...";$(MAKE) install-mockery; }
112
+
@which mockery > /dev/null || { echo"mockery not found. Trying to install via go install...";$(MAKE) install-mockery; }
113
+
@mockery --version | grep -q $(MOCKERY_VERSION)|| { echo"mockery version is not $(MOCKERY_VERSION). Trying to install the correct version...";$(MAKE) install-mockery; }
112
114
113
115
install-mockery:
114
-
@if command -v brew> /dev/null;then\
115
-
echo"Installing mockery via Homebrew";\
116
-
brew install mockery;\
116
+
@if command -v go> /dev/null;then\
117
+
echo"Installing mockery via go install";\
118
+
go install github.com/vektra/mockery/v2@$(MOCKERY_VERSION);\
117
119
else\
118
-
echo"Error: Homebrew is not installed. Please install Homebrew first and ensure it's in your PATH.";\
120
+
echo"Error: Golang is not installed. Please install golang first and ensure it's in your PATH.";\
Copy file name to clipboardExpand all lines: cmd/modelfile/generate.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ func init() {
61
61
flags.StringVar(&generateConfig.ParamSize, "param-size", "", "specify number of model parameters, such as 8b, 16b, 32b, etc")
62
62
flags.StringVar(&generateConfig.Precision, "precision", "", "specify model precision, such as bf16, fp16, int8, etc")
63
63
flags.StringVar(&generateConfig.Quantization, "quantization", "", "specify model quantization, such as awq, gptq, etc")
64
-
flags.StringVarP(&generateConfig.Output, "output", "O", ".", "specify the output path of modelfilem, must be a directory")
64
+
flags.StringVarP(&generateConfig.Output, "output", "O", "", "specify the output path of modelfilem, must be a directory")
65
65
flags.BoolVar(&generateConfig.IgnoreUnrecognizedFileTypes, "ignore-unrecognized-file-types", false, "ignore the unrecognized file types in the workspace")
66
66
flags.BoolVar(&generateConfig.Overwrite, "overwrite", false, "overwrite the existing modelfile")
Copy file name to clipboardExpand all lines: cmd/pull.go
+2-15Lines changed: 2 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@ func init() {
54
54
flags.BoolVar(&pullConfig.Insecure, "insecure", false, "use insecure connection for the pull operation and skip TLS verification")
55
55
flags.StringVar(&pullConfig.Proxy, "proxy", "", "use proxy for the pull operation")
56
56
flags.StringVar(&pullConfig.ExtractDir, "extract-dir", "", "specify the extract dir for extracting the model artifact")
57
+
flags.BoolVar(&pullConfig.ExtractFromRemote, "extract-from-remote", false, "turning on this flag will pull and extract the data from remote registry and no longer store model artifact locally, so user must specify extract-dir as the output directory")
57
58
58
59
iferr:=viper.BindPFlags(flags); err!=nil {
59
60
panic(fmt.Errorf("bind cache pull flags to viper: %w", err))
0 commit comments