forked from openshift/microshift
-
Notifications
You must be signed in to change notification settings - Fork 5
/
object-detection-rest.yaml
97 lines (97 loc) · 2.02 KB
/
object-detection-rest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
apiVersion: v1
kind: Pod
metadata:
labels:
run: notebook
name: notebook
spec:
initContainers:
- name: pull-object-detection-workshop
image: docker.io/alpine/git
command: ["git", "clone", "https://github.com/thinkahead/object-detection-rest.git", "/data"]
#command: ["git", "clone", "https://github.com/rh-aiservices-bu/object-detection-rest.git", "/data"]
volumeMounts:
- name: volume-name
mountPath: /data
containers:
- image: docker.io/karve/tensorflow-notebook:arm64
#imagePullPolicy: IfNotPresent
imagePullPolicy: Always
#- image: docker.io/jupyter/scipy-notebook:latest
name: pod
# mysecretpassword
args: ["jupyter", "notebook", "--port", "5001", "--no-browser", "--ip=*", "--NotebookApp.token=", "--NotebookApp.password=sha1:d6941d783443:9f33baf62756660be91b606f0fdf1b57b6d3c6fa"]
volumeMounts:
- name: volume-name
mountPath: /home/jovyan/work
dnsPolicy: ClusterFirst
restartPolicy: Always
volumes:
- name: volume-name
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
run: notebook
name: flask-svc
spec:
ports:
- port: 5000
protocol: TCP
targetPort: 5000
selector:
run: notebook
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
run: notebook
name: notebook-svc
spec:
ports:
- port: 5001
protocol: TCP
targetPort: 5001
selector:
run: notebook
sessionAffinity: None
type: ClusterIP
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
run: notebook
name: notebook-route
spec:
host: notebook-route-default.cluster.local
port:
targetPort: 5001
to:
kind: Service
name: notebook-svc
weight: 100
wildcardPolicy: None
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
run: notebook
name: flask-route
spec:
host: flask-route-default.cluster.local
port:
targetPort: 5000
to:
kind: Service
name: notebook-svc
weight: 100
wildcardPolicy: None