diff --git a/README.md b/README.md index 5a5d13d4c56..34fddc158a6 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,12 @@ NAMESPACE=kubeflow kubectl create namespace ${NAMESPACE} ks generate core kubeflow-core --name=kubeflow-core --namespace=${NAMESPACE} +# If your cluster is running on Azure you will need to set the cloud parameter. +# If the cluster was created with AKS or ACS choose aks, it if was created +# with acs-engine, choose acsengine +# PLATFORM= +# ks param set kubeflow-core cloud ${PLATFORM} + # Enable collection of anonymous usage metrics # Skip this step if you don't want to enable collection. ks param set kubeflow-core reportUsage true diff --git a/kubeflow/core/tf-job.libsonnet b/kubeflow/core/tf-job.libsonnet index dd776acb40d..73ae0d532c8 100644 --- a/kubeflow/core/tf-job.libsonnet +++ b/kubeflow/core/tf-job.libsonnet @@ -105,7 +105,7 @@ else {}, - azureAccelerators:: { + aksAccelerators:: { accelerators: { "alpha.kubernetes.io/nvidia-gpu": { volumes: [ @@ -129,9 +129,25 @@ }, }, + acsEngineAccelerators:: { + accelerators: { + "alpha.kubernetes.io/nvidia-gpu": { + volumes: [ + { + name: "nvidia", + mountPath: "/usr/local/nvidia", + hostPath: "/usr/local/nvidia", + }, + ], + }, + }, + }, + configData(cloud, tfDefaultImage):: self.defaultControllerConfig(tfDefaultImage) + - if cloud == "azure" then - self.azureAccelerators + if cloud == "aks" then + self.aksAccelerators + else if cloud == "acsengine" then + self.acsEngineAccelerators else {}, diff --git a/user_guide.md b/user_guide.md index 3fb758e203f..47a8e478df7 100644 --- a/user_guide.md +++ b/user_guide.md @@ -57,7 +57,7 @@ ks env add nocloud ks env add cloud ``` -The `nocloud` environment can be used for minikube or other basic k8s clusters, the `cloud` environment will be used for GKE in this guide. +The `nocloud` environment can be used for minikube or other basic k8s clusters, the `cloud` environment will be used for GKE or Azure in this guide. If using GKE, we can configure our cloud environment to use GCP features with a single parameter: @@ -65,6 +65,19 @@ If using GKE, we can configure our cloud environment to use GCP features with a ks param set kubeflow-core cloud gke --env=cloud ``` +If the cluster was created on Azure with AKS/ACS: + +``` +ks param set kubeflow-core cloud aks --env=cloud +``` + +If it was created with acs-engine instead: + +``` +ks param set kubeflow-core cloud acsengine --env=cloud +``` + + Now let's set `${KF_ENV}` to `cloud` or `nocloud` to reflect our environment for the rest of the guide: ```