-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkamiak_upload.sh
More file actions
executable file
·38 lines (32 loc) · 1.21 KB
/
kamiak_upload.sh
File metadata and controls
executable file
·38 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
. config.py
echo "Warning: if there's already .data files on Kamiak, it'll run on any not yet run on"
# Note both have trailing slashes
from="$localdir"
to="$remotessh:$remotedir"
# Update darknet
git submodule update
cd darknet
git pull
cd ..
# Copy only select files
#
# One directory: https://stackoverflow.com/a/21830454/2698494
# Recursive: https://stackoverflow.com/a/11111793/2698494
rsync -Pahuv --include="./" --include="*.txt" --include="*.data" \
--include="*.names" --include="*.cfg" --include="*.sh" \
--include="*.config" --include="*.srun" --include="*.py" \
--include="datasets" --include="$datasetFolder" \
--include="$datasetFolder/$datasetCompressed" \
--include="*model*.ckpt.*" \
--include="$datasetFolder/${datasetTFtrain}*" \
--include="$datasetFolder/${datasetTFvalid}*" \
--include="$datasetFolder/${datasetTFtest}" \
--include="$datasetFolder/${datasetTFlabels}" \
--exclude="*" "$from" "$to"
#--include="$datasetFolder/${datasetTFcompressed}"
# Copy submodules
rsync -Pahuv "$from/darknet" "$to"
rsync -Pahuv "$from/models" --exclude="__pycache__" "$to"
# Make SLURM log folder
ssh "$remotessh" "mkdir -p $remotedir/slurm_logs"