-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yaml
135 lines (135 loc) · 3.04 KB
/
deployment.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
apiVersion: v1
kind: Secret
metadata:
name: docker-registry
namespace: ai-stack
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: encoded_json_git_credentials
---
apiVersion: v1
kind: Secret
metadata:
name: app-secrets
namespace: ai-stack
type: Opaque
data:
HF_API_TOKEN: hf_api_token
TAVILY_API_KEY: tavily_api_key
STACK_EXCHANGE_API_KEY: stack_exchange_api_key
---
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
namespace: ai-stack
data:
TGI_HOST: "192.168.0.202"
TGI_PORT: "80"
TEI_HOST: "192.168.0.203"
TEI_PORT: "80"
VECTORDB_HOST: "192.168.0.201"
VECTORDB_PORT: "8000"
TGI_MODEL: "teknium/OpenHermes-2.5-Mistral-7B"
TEI_MODEL: "BAAI/bge-large-en-v1.5"
STOP_TOKEN: "<|im_end|>"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: insightful
namespace: ai-stack
labels:
app: insightful
spec:
replicas: 1
selector:
matchLabels:
app: insightful
template:
metadata:
labels:
app: insightful
spec:
containers:
- name: insightful
image: ghcr.io/infracloudio/insightful:latest
env:
- name: HUGGING_FACE_HUB_TOKEN
valueFrom:
secretKeyRef:
name: app-secrets
key: HF_API_TOKEN
- name: TAVILY_API_KEY
valueFrom:
secretKeyRef:
name: app-secrets
key: TAVILY_API_KEY
- name: STACK_EXCHANGE_API_KEY
valueFrom:
secretKeyRef:
name: api-secrets
key: STACK_EXCHANGE_API_KEY
- name: TGI_HOST
valueFrom:
configMapKeyRef:
name: app-config
key: TGI_HOST
- name: TGI_PORT
valueFrom:
configMapKeyRef:
name: app-config
key: TGI_PORT
- name: TEI_HOST
valueFrom:
configMapKeyRef:
name: app-config
key: TEI_HOST
- name: TEI_PORT
valueFrom:
configMapKeyRef:
name: app-config
key: TEI_PORT
- name: VECTORDB_HOST
valueFrom:
configMapKeyRef:
name: app-config
key: VECTORDB_HOST
- name: VECTORDB_PORT
valueFrom:
configMapKeyRef:
name: app-config
key: VECTORDB_PORT
- name: TGI_MODEL
valueFrom:
configMapKeyRef:
name: app-config
key: TGI_MODEL
- name: TEI_MODEL
valueFrom:
configMapKeyRef:
name: app-config
key: TEI_MODEL
- name: STOP_TOKEN
valueFrom:
configMapKeyRef:
name: app-config
key: STOP_TOKEN
ports:
- containerPort: 8051
imagePullSecrets:
- name: docker-registry
---
apiVersion: v1
kind: Service
metadata:
name: insightful
namespace: ai-stack
spec:
selector:
app: insightful
ports:
- protocol: TCP
port: 8051
targetPort: 8051
type: LoadBalancer