Skip to content

Commit

Permalink
Add docker-for-desktop platform
Browse files Browse the repository at this point in the history
 - Steps required are similar to minikube, nothing special

Signed-off-by: Roberto Gandolfo Hashioka <roberto_hashioka@hotmail.com>
  • Loading branch information
rogaha committed Nov 20, 2018
1 parent a3af71d commit 63fe69d
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions scripts/kfctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ createEnv() {
echo KUBEFLOW_CLOUD=docker-for-desktop >> ${ENV_FILE}
echo MOUNT_LOCAL=${MOUNT_LOCAL} >> ${ENV_FILE}
;;
docker-for-desktop)
echo KUBEFLOW_PLATFORM=docker-for-desktop >> ${ENV_FILE}
echo MOUNT_LOCAL=${MOUNT_LOCAL} >> ${ENV_FILE}
;;
ack)
echo KUBEFLOW_CLOUD=ack >> ${ENV_FILE}
echo KUBEFLOW_DOCKER_REGISTRY=registry.aliyuncs.com >> ${ENV_FILE}
Expand Down Expand Up @@ -231,16 +235,7 @@ ksApply () {
pushd ${KUBEFLOW_KS_DIR}

if [ "${PLATFORM}" == "minikube" ] || [ "${PLATFORM}" == "docker-for-desktop" ]; then
set +e
O=`kubectl get namespace ${K8S_NAMESPACE} 2>&1`
RESULT=$?
set -e

if [ "${RESULT}" -eq 0 ]; then
echo "namespace ${K8S_NAMESPACE} already exists"
else
kubectl create namespace ${K8S_NAMESPACE}
fi
createNamespace
fi

set +e
Expand All @@ -262,6 +257,13 @@ ksApply () {
ks apply default -c argo
ks apply default -c katib
ks apply default -c spartakus

# Reduce resource demands locally
if [ "${PLATFORM}" != "minikube" ] && [ "${PLATFORM}" != "docker-for-desktop" ]; then
ks apply default -c argo
ks apply default -c katib
fi

popd

set +x
Expand Down Expand Up @@ -295,7 +297,7 @@ if [ "${COMMAND}" == "generate" ]; then
gcpGenerateKsApp
fi

if [ "${PLATFORM}" == "minikube" ] || [ "${PLATFORM}" == "docker-for-desktop" ]; then
if [ "${PLATFORM}" == "minikube" ] || [ "${PLATFORM}" == "docker-for-desktop" ]; then
create_local_fs_mount_spec
if ${MOUNT_LOCAL}; then
ks param set jupyter disks "local-notebooks"
Expand Down

0 comments on commit 63fe69d

Please sign in to comment.