This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from panchul/alekp_kubeflow_install
Chapter on deploying models with Kubeflow pipelines
- Loading branch information
Showing
6 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,3 +104,9 @@ venv.bak/ | |
.mypy_cache/ | ||
/.vs | ||
/staged-data-analytics | ||
|
||
# VS Code | ||
.vscode | ||
|
||
# vi | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions
27
Research/kubeflow-on-azure-stack/sbin/deployment-demo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: my-nginx | ||
labels: | ||
app: my-nginx | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: my-nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: my-nginx | ||
spec: | ||
containers: | ||
- name: my-nginx | ||
image: nginx:alpine | ||
ports: | ||
- containerPort: 80 | ||
resources: | ||
limits: | ||
memory: "128Mi" #128 MB | ||
cpu: "200m" #200 millicpu (.2 cpu or 20% of the cpu) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# | ||
# the pipeline to pass parameters to a model and | ||
# eventually expose the deployment port to the outside. | ||
# | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: inferencing-demo- | ||
spec: | ||
entrypoint: inferencing-example | ||
templates: | ||
- name: inferencing-example | ||
steps: | ||
- - name: generate-input | ||
template: whalesay | ||
- - name: consume-input | ||
template: run-model | ||
arguments: | ||
artifacts: | ||
# bind message to the intput-art artifact | ||
# generated by the generate-input step | ||
- name: message | ||
from: "{{steps.generate-input.outputs.artifacts.input-art}}" | ||
|
||
- name: whalesay | ||
container: | ||
#image: docker/whalesay:latest | ||
image: alpine:latest | ||
command: [sh, -c] | ||
args: ["echo -e \"{\\\"x\\\":3.0}\" | tee /tmp/message"] | ||
outputs: | ||
artifacts: | ||
# generate hello-art artifact from /tmp/message | ||
# artifacts can be directories as well as files | ||
- name: input-art | ||
path: /tmp/message | ||
|
||
- name: run-model | ||
inputs: | ||
artifacts: | ||
# unpack the message input artifact | ||
# and put it at /tmp/message | ||
- name: message | ||
path: /tmp/message | ||
container: | ||
image: alpine:latest | ||
command: [sh, -c] | ||
args: ["cat /tmp/message"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# the pipeline to create an inferencing endpoint | ||
# | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: inferencing-demo-curl- | ||
spec: | ||
entrypoint: inferencing-example | ||
templates: | ||
- name: inferencing-example | ||
steps: | ||
- - name: run-inference-server | ||
template: run-model | ||
|
||
- name: run-model | ||
container: | ||
image: nginx:alpine | ||
ports: | ||
- containerPort: 80 | ||
#command: [sh, -c] | ||
#args: ["do stuff"] | ||
|