-
Notifications
You must be signed in to change notification settings - Fork 1
/
standalone.template.txt
20 lines (20 loc) · 1.26 KB
/
standalone.template.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
READ_STR
RUN_STR
sudo Rscript ~/delete_later/R/postproc.r TEST_CHR
cd ~/delete_later; git log > ~/gitlog.txt; git diff > ~/gitdiff.txt; cd ~/
aws s3 mb s3://BUCKET_NAME/ --region REGION
aws s3 cp ~/input.list s3://BUCKET_NAME/RUN_NAME/ --region REGION
aws s3 cp ~/runall.sh s3://BUCKET_NAME/RUN_NAME/ --region REGION
aws s3 cp ~/params.txt s3://BUCKET_NAME/RUN_NAME/ --region REGION
aws s3 cp ~/runlog.txt s3://BUCKET_NAME/RUN_NAME/ --region REGION
aws s3 cp ~/gitlog.txt s3://BUCKET_NAME/RUN_NAME/ --region REGION
aws s3 cp ~/gitdiff.txt s3://BUCKET_NAME/RUN_NAME/ --region REGION
find /mnt/summaries/* | xargs -L 1 -I {} aws s3 cp {} s3://BUCKET_NAME/RUN_NAME/summaries/ --region REGION
find /mnt/output/*.bin | xargs -L 1 -I {} aws s3 cp {} s3://BUCKET_NAME/RUN_NAME/output/ --region REGION
lzop -1 /mnt/input/*
find /mnt/input/*.lzo | xargs -L 1 -I {} aws s3 cp {} s3://BUCKET_NAME/RUN_NAME/input/ --region REGION
aws ses send-email --from [email protected] --to EMAIL --text "$(head -n 50 ~/runlog.txt)" --subject RUN_NAME_complete --region REGION
aws s3 cp ~/nohup.txt s3://BUCKET_NAME/RUN_NAME/ --region REGION
aws ec2 cancel-spot-instance-requests --spot-instance-request-ids SIRNAME --region REGION
aws ec2 terminate-instances --instance-ids INAME --region REGION