aboutsummaryrefslogtreecommitdiff
path: root/pod.yaml
blob: a415c043fd9b74b2c789880845a37776a911fa08 (plain) (blame)
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
69
70
# a pod for testing the torch implementation of nms on a gpu
apiVersion: v1
kind: Pod
metadata:
  name: swr-asr
  labels:
    app: swr-asr
spec:
  initContainers:
    - name: swr-asr-init
      image: pherkel/swr2-asr
      imagePullPolicy: Always
      command: ["/bin/sh", "-c", "cp -R /app/* /tmp/"]
      volumeMounts:
        - name: swr-asr-vol
          mountPath: /tmp

      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop: ["ALL"]


  containers:
    - name: swr-asr
      image: pherkel/swr2-asr
      imagePullPolicy: Always
      # command: ["/bin/bash", "-c", "while sleep 1000; do :; done"]

      volumeMounts:
        - name: swr-asr-vol
          mountPath: /app

        # workaround for increasing worker shared memory size
        - name: shm-vol
          mountPath: /dev/shm

      resources:
        requests:
          nvidia.com/gpu: "1"
          memory: "8Gi"
          cpu: "4"
        limits:
          nvidia.com/gpu: "1"
          memory: "8Gi"
          cpu: "4"

      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop: ["ALL"]

  volumes:
    - name: swr-asr-vol
      persistentVolumeClaim:
        claimName: swr-asr-vol
    - name: shm-vol
      emptyDir:
        medium: Memory

  securityContext:
    runAsNonRoot: true
    runAsUser: 1000
    runAsGroup: 1000
    fsGroup: 1000
    seccompProfile:
      type: RuntimeDefault

  nodeSelector:
    optocycle.com/infrastructure-provider: ocs