apiVersion: v1
kind: ConfigMap
metadata:
  name: gpu-burn-entrypoint
  namespace: default
data:
  entrypoint.sh: |-
    #!/bin/bash
    set -e

    cd /tmp

    GITHUB_REPO=kpouget/gpu-burn
    REF=471cc9b3ea3967a4d7bec698ec768df80344504a # kpouget/ci-friendly
    SRC=https://raw.githubusercontent.com/$GITHUB_REPO/$REF
    
    for f in  compare.cu  gpu_burn-drv.cpp Makefile; do
      curl -s $SRC/$f > $f
    done
    make

    echo ""
    time /tmp/gpu_burn $GPU_BURN_TIME
