zero-shot-classification-zh/manifest.yaml

95 lines
2.2 KiB
YAML
Raw Normal View History

2024-10-24 05:07:11 +00:00
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: text-classification-pvc
namespace: ecosystem
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: text-classification
namespace: ecosystem
spec:
selector:
matchLabels:
app: text-classification
tier: backend
template:
metadata:
labels:
app: text-classification
tier: backend
spec:
2024-11-05 18:03:15 +00:00
runtimeClassName: "nvidia"
2024-10-24 05:07:11 +00:00
volumes:
- name: text-classification-models
persistentVolumeClaim:
claimName: text-classification-pvc
containers:
- name: text-classification
2024-11-05 18:01:25 +00:00
image: leafdev.top/ecosystem/zero-shot-classification:v0.0.4
2024-10-24 05:07:11 +00:00
env:
- name: HF_DATASETS_CACHE
value: "/app/models"
- name: HF_HOME
value: "/app/models"
- name: HUGGINGFACE_HUB_CACHE
value: "/app/models"
- name: TRANSFORMERS_CACHE
value: "/app/models"
2024-10-24 05:30:02 +00:00
- name: HF_ENDPOINT
value: "https://hf-mirror.com"
- name: GPU_DEVICE
value: "-1"
2024-10-24 05:07:11 +00:00
# - name: CUDA_VISIBLE_DEVICES
# value: "1"
ports:
- containerPort: 80
protocol: TCP
name: http
2024-11-05 18:03:15 +00:00
resources:
limits:
nvidia.com/gpu: "1"
nvidia.com/gpumem: "1000"
2024-10-24 05:07:11 +00:00
volumeMounts:
- mountPath: /app/models
name: text-classification-models
---
apiVersion: v1
kind: Service
metadata:
name: text-classification
namespace: ecosystem
spec:
selector:
app: text-classification
tier: backend
type: ClusterIP
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: zero-shot-classification-http
namespace: ecosystem
spec:
hostnames:
- text-classification-api-testing.leaflow.cn
parentRefs:
- name: http-gw
namespace: networking
rules:
- backendRefs:
- name: text-classification
port: 80