apiVersion: v1
kind: ConfigMap
metadata:
  name: bionemo-startup-script
  namespace: bionemo-training
data:
  start.sh: |
    #!/bin/bash
    nvidia-smi
    
    DATA_DIR=/mnt/data
    download_bionemo_data esm2/testdata_esm2_pretrain:2.0 --source ngc
    
    mv /root/.cache/bionemo/006911f92bbc0ded7ea302bbdbfab4c694b409e699c32fd49de1c527a99dba3e-2024_03_sanity.tar.gz.untar/2024_03_sanity $DATA_DIR
    
    export PATH=$PATH:/usr/local/nvidia/lib64/
    /sbin/ldconfig
    
    python scripts/protein/esm2/esm2_pretrain.py \
      --train-cluster-path ${DATA_DIR}/2024_03_sanity/train_clusters_sanity.parquet \
      --train-database-path ${DATA_DIR}/2024_03_sanity/train_sanity.db \
      --valid-cluster-path ${DATA_DIR}/2024_03_sanity/valid_clusters.parquet \
      --valid-database-path ${DATA_DIR}/2024_03_sanity/validation.db \
      $(cat /config/training-params)