Skip to content
Merged
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: 15 additions & 3 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ func init() {
initCmd.Flags().StringSliceVarP(&GPUDevicePlugins, "gpu-device-plugins", "", nil, "Install NVIDIA and/or AMD gpu device plugins. Valid values can be comma separated and are: amd, nvidia")
initCmd.Flags().StringSliceVarP(&Services, "services", "", nil, "Install additional services. Valid values can be comma separated and are: modeldb")

initCmd.MarkFlagRequired("provider")
if err := initCmd.MarkFlagRequired("provider"); err != nil {
log.Printf("[error] %v", err)
}
}

func validateInput() error {
Expand Down Expand Up @@ -308,9 +310,19 @@ func validateInput() error {
return err
}

err := validateServices(Services)
if err := validateServices(Services); err != nil {
return err
}

for _, c := range Services {
if c == "modeldb" {
if ArtifactRepositoryProvider == artifactRepositoryProviderGcs {
return fmt.Errorf("modeldb is currently not supported with GCS")
}
}
}

return err
return nil
}

func validateProvider(prov string) error {
Expand Down