-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathdeployment.yaml
68 lines (68 loc) · 1.87 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: tei-deployment
namespace: hf-gke-namespace
spec:
replicas: 1
selector:
matchLabels:
app: tei-server
template:
metadata:
labels:
app: tei-server
hf.co/model: BAAI--bge-base-en-v1.5
hf.co/task: text-embeddings
spec:
serviceAccountName: hf-gke-service-account
initContainers:
- name: init
image: google/cloud-sdk:slim
command: ["sh", "-c"]
args:
- gcloud storage cp -r gs://$BUCKET_PATH /data
env:
- name: BUCKET_PATH
value: hf-models-gke-bucket/bge-base-en-v1.5
volumeMounts:
- name: gcs-mount
mountPath: /data
resources:
requests:
cpu: 8.0
containers:
- name: tei-container
image: us-docker.pkg.dev/deeplearning-platform-release/gcr.io/huggingface-text-embeddings-inference-cpu.1-4:latest
resources:
requests:
cpu: "8"
memory: "32Gi"
limits:
cpu: "12"
memory: "64Gi"
env:
- name: MODEL_ID
value: /data/bge-base-en-v1.5
- name: NUM_SHARD
value: "1"
- name: PORT
value: "8080"
- name: HUGGINGFACE_OFFLINE
value: "1"
volumeMounts:
- mountPath: /data
name: gcs-mount
volumes:
- name: gcs-mount
ephemeral:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: ssd
resources:
requests:
storage: 48Gi
nodeSelector:
cloud.google.com/compute-class: "Performance"
cloud.google.com/machine-family: "c2"