Skip to content

Commit

Permalink
add option for mpi kubectl delivery (#1525)
Browse files Browse the repository at this point in the history
* add option for select kubectl delivery image for mpi

* unify receiver name and delete redundant conversion
  • Loading branch information
zw0610 authored Jan 20, 2022
1 parent 51d6385 commit 174e881
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 128 deletions.
4 changes: 4 additions & 0 deletions cmd/training-operator.v1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func main() {
flag.StringVar(&config.Config.PyTorchInitContainerTemplateFile, "pytorch-init-container-template-file",
config.PyTorchInitContainerTemplateFileDefault, "The template file for pytorch init container")

// MPI related flags
flag.StringVar(&config.Config.MPIKubectlDeliveryImage, "mpi-kubectl-delivery-image",
config.MPIKubectlDeliveryImageDefault, "The image for mpi launcher init container")

opts := zap.Options{
Development: true,
StacktraceLevel: zapcore.DPanicLevel,
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package config
var Config struct {
PyTorchInitContainerTemplateFile string
PyTorchInitContainerImage string
MPIKubectlDeliveryImage string
}

const (
Expand All @@ -27,4 +28,6 @@ const (
// PyTorchInitContainerTemplateFileDefault is the default template file for
// the pytorch init container.
PyTorchInitContainerTemplateFileDefault = "/etc/config/initContainer.yaml"
// MPIKubectlDeliveryImageDefault is the default image for launcher pod in MPIJob init container.
MPIKubectlDeliveryImageDefault = "mpioperator/kubectl-delivery:latest"
)
2 changes: 0 additions & 2 deletions pkg/controller.v1/mpi/mpijob.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ const (
// gang scheduler name.
gangSchedulerName = "volcano"

kubectlDeliveryImage = "mpioperator/kubectl-delivery:latest"

// podTemplateSchedulerNameReason is the warning reason when other scheduler name is set
// in pod templates with gang-scheduling enabled
podTemplateSchedulerNameReason = "SettedPodTemplateSchedulerName"
Expand Down
Loading

0 comments on commit 174e881

Please sign in to comment.