---
pipeline:
  name: precipWeighing_combine_precip
transform:
  image_pull_secrets:
  - battelleecology-quay-read-all-pull-secret
  image: quay.io/battelleecology/neon-is-precip-aepg-comb-r:4d165c82
  cmd:
  - sh
  - "-c"
  - |-
    /bin/bash <<'EOF'
    # Use bash-scrict mode. See http://redsymbol.net/articles/unofficial-bash-strict-mode/
    set -euo pipefail
    IFS=$'\n\t'
    
    # Run precip computation module
    Rscript ./flow.precip.aepg.comb.R \
      DirIn=$DIR_IN \
      DirOut=/pfs/out \
      DirErr=/pfs/out/errored_datums
    EOF
  env:
    OUT_PATH: /pfs/out
    LOG_LEVEL: DEBUG
    PARALLELIZATION_INTERNAL: '3'
output_branch: master
input:
  pfs:
    name: DIR_IN
    repo: precipWeighing_compute_precip_dynamic
    glob: /*/*/*
parallelism_spec:
  constant: 5
autoscaling: true
resource_requests:
  memory: 2G
  cpu: 3.3
resource_limits:
  memory: 3G
  cpu: 4.5
sidecar_resource_requests:
  memory: 3G
  cpu: 0.3
datum_set_spec:
  number: 1
scheduling_spec:
  node_selector:
    cloud.google.com/gke-ephemeral-storage-local-ssd: "true"
    nodepool.neonscience.org/pipeline: "yes"
    cloud.google.com/gke-spot: "true"
pod_spec: |-
  { "tolerations": [
    {
      "key": "nodepool.neonscience.org/pipeline",
      "operator": "Exists"
    },
    {
      "effect": "NoSchedule",
      "key": "cloud.google.com/gke-spot",
      "operator": "Exists"
    }  
  ] }
