Skip to content

Instantly share code, notes, and snippets.

View swiftdiaries's full-sized avatar

Adhita Selvaraj swiftdiaries

View GitHub Profile
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: basic-hybrid-pipeline-launcher
namespace: kubeflow
spec:
template:
metadata:
labels:
app: "notebook-launcher"
#!/bin/bash
runipy /src/app/basic_hybrid_pipeine_run.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import kfp.dsl as dsl
import kfp.onprem as onprem
import kfp.gcp as gcp
from kubernetes import client as k8s_client
pvc_name = 'nfs' # pvc name should be same as one in pipeline definition
def source_cluster_op(step_name='run-onprem'):
return dsl.ContainerOp(
name = step_name,
image = 'ciscoai/run-onprem-deploy:1.0',
# Download service account key
gcloud iam service-accounts keys create ~/hybrid-kubeflow-pipeline-demo.json \
--iam-account [SA-NAME]@[PROJECT-ID].iam.gserviceaccount.com
# Create a Kubernetes secret for the service account key
kubectl create secret generic gke-kfp-sa \
--from-file=~/hybrid-kubeflow-pipeline-demo.json -n kubeflow
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: bolts-launcher
spec:
template:
metadata:
labels:
app: "notebook-launcher"
spec:
# For clusters with the default Storage Class named 'standard'
# This is true for Cisco Container Platform and Google Kubernetes Engine clusters
helm init --service-account=tiller
helm repo update
helm install stable/nfs-server-provisioner --name kf-nfs-storageclass \
--set=persistence.enabled=true,persistence.storageClass=standard,persistence.size=200Gi
# For clusters with the default Storage Class named 'default'
# This is for Azure clusters
helm init --service-account=tiller
helm repo update
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: default-workspace
spec:
accessModes:
- ReadWriteOnce
storageClassName: nfs
resources:
requests:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: nfs
namespace: kubeflow
spec:
accessModes:
- ReadWriteMany
storageClassName: nfs
resources:
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,