File size: 1,513 Bytes
a5eaebe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
apiVersion: v1
kind: Service
metadata:
  name: responsible-ai-moderation-model
  namespace: irai-toolkit-test
  labels:
    app: responsible-ai-moderation-model
spec:
  type: ClusterIP
  ports:
  - port: 8000
  selector:
    app: responsible-ai-moderation-model
---
apiVersion: apps/v1
kind: Deployment
seccompProfile:
type: "RuntimeDefault"
automountServiceAccountToken: false
metadata:
  name: responsible-ai-moderation-model
  namespace: irai-toolkit-test
  labels:
    app: responsible-ai-moderation-model
    version: v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: responsible-ai-moderation-model
      version: v1
  template:
    metadata:
      labels:
        app: responsible-ai-moderation-model
        version: v1
    spec:
      automountServiceAccountToken: false # Disable token mounting
      imagePullSecrets:
         - name: docker-secret
      containers:
        - envFrom:
          - configMapRef:
              name: privacy-config
          image: <Image Name>
          imagePullPolicy: Always
          name: responsible-ai-privacy
          ports:
            - containerPort: 8000
          securityContext:
            runAsUser: 1000  # Non-root user
            runAsGroup: 1000
            capabilities:
              drop:
                - ALL  # Drop all capabilities
            seccompProfile:
              type: RuntimeDefault
          resources:
            limits:
                #cpu: '2'
                memory: '8Gi'
                nvidia.com/gpu: 1