github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/examples/azure/deployment-1.9.yaml (about)

     1  # Copyright (c) 2019-2020 Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License.
     2  ---
     3  apiVersion: v1
     4  kind: ConfigMap
     5  metadata:
     6    name: studioml-env
     7  data:
     8    LOGXI_FORMAT: "happy,maxcol=1024"
     9    LOGXI: "*=DBG"
    10    SQS_CERTS: "certs/aws-sqs"
    11    MESSAGE_CRYPT: "certs/message"
    12    QUEUE_MATCH: "^(rmq|sqs)_.*$"
    13    AMPQ_URL: ""
    14  ---
    15  apiVersion: v1
    16  kind: ServiceAccount
    17  metadata:
    18    name: studioml-account
    19  ---
    20  apiVersion: rbac.authorization.k8s.io/v1
    21  kind: ClusterRole
    22  metadata:
    23    name: studioml-role
    24  rules:
    25  - apiGroups:
    26    - "*"
    27    resources:
    28    - configMaps
    29    verbs:
    30    - get
    31    - list
    32    - watch
    33  ---
    34  apiVersion: rbac.authorization.k8s.io/v1
    35  kind: RoleBinding
    36  metadata:
    37    name: studioml-role-bind
    38  subjects:
    39  - kind: ServiceAccount
    40    name: studioml-account
    41  roleRef:
    42    kind: ClusterRole
    43    name: studioml-role
    44    apiGroup: rbac.authorization.k8s.io
    45  ---
    46  apiVersion: apps/v1
    47  kind: Deployment
    48  metadata:
    49    name: studioml-go-runner-deployment
    50    labels:
    51      app: studioml-go-runner
    52  spec:
    53    progressDeadlineSeconds: 360
    54    selector:
    55      matchLabels:
    56        app: studioml-go-runner
    57    replicas: 1
    58    strategy:
    59      type: RollingUpdate
    60    template:
    61      metadata:
    62        labels:
    63          app: studioml-go-runner
    64      spec:
    65        serviceAccountName: studioml-account
    66        automountServiceAccountToken: false
    67        containers:
    68        - name: studioml-go-runner
    69          envFrom:
    70              - configMapRef:
    71                  name: studioml-env
    72          image: {{ expandenv "$azure_registry_name"}}.azurecr.io/sentient.ai/{{.duat.module}}/runner:{{.duat.version}}
    73          imagePullPolicy: Always
    74          resources:
    75            limits:
    76              alpha.kubernetes.io/nvidia-gpu: 1
    77              memory: "50Gi"
    78              cpu: "4"
    79          volumeMounts:
    80          - mountPath: /tmp
    81            name: tmp-volume
    82          - name: aws-sqs
    83            mountPath: "/runner/certs/aws-sqs/default"
    84            readOnly: true
    85          - mountPath: /usr/local/nvidia/bin
    86            name: bin
    87          - mountPath: /usr/local/nvidia/lib64
    88            name: lib
    89          - mountPath: /usr/lib/x86_64-linux-gnu/libcuda.so.1
    90            name: libcuda
    91          - name: message-encryption
    92            mountPath: "/runner/certs/message/encryption"
    93            readOnly: true
    94          - name: encryption-passphrase
    95            mountPath: "/runner/certs/message/passphrase"
    96            readOnly: true
    97        nodeSelector:
    98          beta.kubernetes.io/os: linux
    99        volumes:
   100          - name: tmp-volume
   101            emptyDir:
   102              sizeLimit: 80Gi
   103          - name: aws-sqs
   104            secret:
   105              optional: true
   106              secretName: studioml-runner-aws-sqs
   107              items:
   108              - key: credentials
   109                path: credentials
   110              - key: config
   111                path: config
   112          - name: message-encryption
   113            secret:
   114              optional: false
   115              secretName: studioml-runner-key-secret
   116              items:
   117              - key: ssh-privatekey
   118                path: ssh-privatekey
   119              - key: ssh-publickey
   120                path: ssh-publickey
   121          - name: encryption-passphrase
   122            secret:
   123              optional: false
   124              secretName: studioml-runner-passphrase-secret
   125              items:
   126              - key: ssh-passphrase
   127                path: ssh-passphrase
   128          - name: bin
   129            hostPath:
   130              path: /usr/lib/nvidia-384/bin
   131          - name: lib
   132            hostPath: 
   133              path: /usr/lib/nvidia-384
   134          - name: libcuda
   135            hostPath:
   136              path: /usr/lib/x86_64-linux-gnu/libcuda.so.1