Spaces:
Sleeping
Sleeping
lanzhiwang
commited on
Commit
·
1c4d61c
1
Parent(s):
ddc97d7
deploy
Browse files- deploy/ksvc.yaml +72 -0
deploy/ksvc.yaml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
apiVersion: serving.knative.dev/v1
|
2 |
+
kind: Service
|
3 |
+
metadata:
|
4 |
+
name: custom-ksvc-ddpm
|
5 |
+
namespace: kubeflow-admin-cpaas-io
|
6 |
+
spec:
|
7 |
+
template:
|
8 |
+
metadata:
|
9 |
+
annotations:
|
10 |
+
autoscaling.knative.dev/class: "kpa.autoscaling.knative.dev"
|
11 |
+
autoscaling.knative.dev/target: "10"
|
12 |
+
autoscaling.knative.dev/minScale: "1"
|
13 |
+
autoscaling.knative.dev/maxScale: "5"
|
14 |
+
spec:
|
15 |
+
containerConcurrency: 1
|
16 |
+
initContainers:
|
17 |
+
- args:
|
18 |
+
- git+lfs://gitee.com/lanzhiwang/ddpm?branch=master-gitee
|
19 |
+
- /mnt/app
|
20 |
+
image: 10.0.200.210:11443/mlops/storage-initializer:v0.8.0-acp-0914
|
21 |
+
imagePullPolicy: IfNotPresent
|
22 |
+
name: storage-initializer
|
23 |
+
resources:
|
24 |
+
limits:
|
25 |
+
cpu: "1"
|
26 |
+
memory: 2Gi
|
27 |
+
requests:
|
28 |
+
cpu: 100m
|
29 |
+
memory: 100Mi
|
30 |
+
volumeMounts:
|
31 |
+
- mountPath: /mnt/app
|
32 |
+
name: space-code-location
|
33 |
+
containers:
|
34 |
+
- env:
|
35 |
+
- name: SPACE_DIR
|
36 |
+
value: /mnt/app
|
37 |
+
- name: APP_NAME
|
38 |
+
value: ddpm
|
39 |
+
- name: PIP_MIRROR
|
40 |
+
value: https://pypi.tuna.tsinghua.edu.cn/simple
|
41 |
+
- name: APP_FILE
|
42 |
+
value: app.py
|
43 |
+
- name: HF_HOME
|
44 |
+
value: ~/.cache/gitee-ai
|
45 |
+
- name: HF_ENDPOINT
|
46 |
+
value: https://ai.gitee.com/huggingface
|
47 |
+
image: 10.0.200.210/3rdparty/gradio-runtime:v3.5
|
48 |
+
command:
|
49 |
+
- bash
|
50 |
+
- -c
|
51 |
+
- /home/user/app/endpoint.sh
|
52 |
+
imagePullPolicy: IfNotPresent
|
53 |
+
ports:
|
54 |
+
- containerPort: 7860
|
55 |
+
name: space-container
|
56 |
+
resources:
|
57 |
+
limits:
|
58 |
+
cpu: "8"
|
59 |
+
memory: 32Gi
|
60 |
+
tencent.com/vcuda-core: "100"
|
61 |
+
tencent.com/vcuda-memory: "64"
|
62 |
+
volumeMounts:
|
63 |
+
- mountPath: /root/.cache/huggingface/hub
|
64 |
+
name: models-location
|
65 |
+
- mountPath: /mnt/app
|
66 |
+
name: space-code-location
|
67 |
+
timeoutSeconds: 600
|
68 |
+
volumes:
|
69 |
+
- name: space-code-location
|
70 |
+
emptyDir: {}
|
71 |
+
- name: models-location
|
72 |
+
emptyDir: {}
|