ddpm / deploy /ksvc.yaml
lanzhiwang's picture
deploy
1c4d61c
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: custom-ksvc-ddpm
namespace: kubeflow-admin-cpaas-io
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/class: "kpa.autoscaling.knative.dev"
autoscaling.knative.dev/target: "10"
autoscaling.knative.dev/minScale: "1"
autoscaling.knative.dev/maxScale: "5"
spec:
containerConcurrency: 1
initContainers:
- args:
- git+lfs://gitee.com/lanzhiwang/ddpm?branch=master-gitee
- /mnt/app
image: 10.0.200.210:11443/mlops/storage-initializer:v0.8.0-acp-0914
imagePullPolicy: IfNotPresent
name: storage-initializer
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- mountPath: /mnt/app
name: space-code-location
containers:
- env:
- name: SPACE_DIR
value: /mnt/app
- name: APP_NAME
value: ddpm
- name: PIP_MIRROR
value: https://pypi.tuna.tsinghua.edu.cn/simple
- name: APP_FILE
value: app.py
- name: HF_HOME
value: ~/.cache/gitee-ai
- name: HF_ENDPOINT
value: https://ai.gitee.com/huggingface
image: 10.0.200.210/3rdparty/gradio-runtime:v3.5
command:
- bash
- -c
- /home/user/app/endpoint.sh
imagePullPolicy: IfNotPresent
ports:
- containerPort: 7860
name: space-container
resources:
limits:
cpu: "8"
memory: 32Gi
tencent.com/vcuda-core: "100"
tencent.com/vcuda-memory: "64"
volumeMounts:
- mountPath: /root/.cache/huggingface/hub
name: models-location
- mountPath: /mnt/app
name: space-code-location
timeoutSeconds: 600
volumes:
- name: space-code-location
emptyDir: {}
- name: models-location
emptyDir: {}