|
#!/bin/bash |
|
|
|
|
|
|
|
root_dir="" |
|
data_dir="" |
|
encoding="" |
|
output="" |
|
metadata="" |
|
test="no" |
|
zip="no" |
|
res="12" |
|
max="-1" |
|
|
|
|
|
for arg in "$@" |
|
do |
|
case $arg in |
|
--root_dir=*) |
|
root_dir="${arg#*=}" |
|
shift |
|
;; |
|
--metadata=*) |
|
metadata="${arg#*=}" |
|
shift |
|
;; |
|
--res=*) |
|
res="${arg#*=}" |
|
shift |
|
;; |
|
--test=*) |
|
test="${arg#*=}" |
|
shift |
|
;; |
|
--data_dir=*) |
|
data_dir="${arg#*=}" |
|
shift |
|
;; |
|
--encoding=*) |
|
encoding="${arg#*=}" |
|
shift |
|
;; |
|
--output=*) |
|
output="${arg#*=}" |
|
shift |
|
;; |
|
--zip=*) |
|
zip="${arg#*=}" |
|
shift |
|
;; |
|
--max=*) |
|
max="${arg#*=}" |
|
shift |
|
;; |
|
esac |
|
done |
|
|
|
module load CCEnv arch/avx512 |
|
module load StdEnv/2020 |
|
module load cmake/3.23.1 |
|
module load gcc/11.3.0 |
|
module load protobuf/3.12.3 |
|
module load python/3.8.2 |
|
|
|
mkdir -p $root_dir/CCLOG |
|
source $root_dir/venv/bin/activate |
|
|
|
cp $root_dir/MIDI-GPT/python_lib/midigpt.cpython-38-x86_64-linux-gnu.so $root_dir/MIDI-GPT/python_scripts |
|
|
|
python3 $root_dir/MIDI-GPT/python_scripts/create_dataset.py --nthreads 40 --max_size $max --data_dir $data_dir --encoding $encoding --output $output --metadata $metadata --test $test --expressive --resolution $res |
|
|
|
if [[ "$zip" == "yes" ]] |
|
then |
|
cd $output |
|
cd ../ |
|
zip -r EXPRESSIVE_GIGAMIDI_24_1920.zip $output |
|
fi |