apiVersion: batch/v1
kind: Job
metadata:
  name: job-cloud-simulation
  namespace: default
  labels:
    user: EY
spec:
  completions: completions-number
  parallelism: parallelism-number
  template:
    metadata:
      name: pod-cloud-simulation
    spec:
      nodeName: node-name
      hostAliases:
        - ip: 172.17.0.184
          hostnames:
            - cicvtest002
      containers:
        - name: vtd-container
          image: vtd.run.perception:latest
          imagePullPolicy: Never
          command: [ "/Controller/VTDController", "/Controller/config/docker_cloud.ini", "projectId"]
          env:
            - name: PodName
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: LM_LICENSE_FILE
              value: 27500@172.14.1.103
          volumeMounts:
            - name: nvidia0
              mountPath: /dev/nvidia0
            - name: nvidiactl
              mountPath: /dev/nvidiactl
          securityContext:
            privileged: true
        - name: algorithm-container
          image: algorithm-image
          imagePullPolicy: Never
          command: [ "/bin/sh", "-c", "run.sh; touch /tmp/hello.txt;while true;do /bin/echo $(date +%T) >> /tmp/hello.txt; sleep 5; done;" ]
      restartPolicy: Always
      volumes:
        - name: nvidia0
          hostPath:
            path: /dev/nvidia0
        - name: nvidiactl
          hostPath:
            path: /dev/nvidiactl
