apiVersion: batch/v1
kind: Job
metadata:
  name: rna-seq-transpose-file-${COUNT}-2
spec:
  backoffLimit: 5
  completions: 1
  template:
    metadata:
      labels:
        k8s-app: rna-seq-transpose-file-${COUNT}
    spec:
      restartPolicy: Never
      containers:
      - name: rna-seq-transpose-file-${COUNT}
        image: jmlehrer/cell-exploration:latest
        command: ["stdbuf", "-i0", "-o0", "-e0", "bash", "-c"]
        env:
        - name: PYTHONUNBUFFERED
          value: "1"
        args: [
          "python src/data/download_data.py --type='raw' --key=${FILE} && \
          python src/data/transpose_data.py --chunksize=1000 --file='${FILE}' --s3-upload"
        ]
        resources:
          limits:
            memory: 500Gi
            cpu: "4"
            ephemeral-storage: 100Gi
          requests:
            memory: 250Gi
            cpu: "4"
            ephemeral-storage: 100Gi
        volumeMounts:
        - name: ephemeral
          mountPath: "/"
      volumes:
      # Ephemeral storage
      - name: ephemeral
        emptyDir: {}