-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
140 additions
and
3 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
scripts/run_batch-code_remote-input_s3-output_s3-work_s3-fusion.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_name=$(basename "$0") | ||
TMPOUT=s3://data-intuitive-tmp/test-nextflow-wave-fusion/output/${script_name%.sh} | ||
OUT=output/${script_name%.sh} | ||
RES=s3://data-intuitive-tmp/test-nextflow-wave-fusion/resources | ||
WORK=s3://data-intuitive-tmp/test-nextflow-wave-fusion/work/${script_name%.sh} | ||
NXF_CONFIG=/tmp/${script_name%.sh}.config | ||
|
||
# clear output dir | ||
echo "Clearing output directory" | ||
aws s3 rm $TMPOUT --recursive | ||
[ -d "$OUT" ] && rm -r "$OUT" | ||
|
||
# run component | ||
echo "Running component" | ||
|
||
cat > $NXF_CONFIG <<EOF | ||
process { | ||
executor = 'awsbatch' | ||
queue = 'di_compute' | ||
container = 'bash:4.0' | ||
} | ||
aws { | ||
region = 'eu-west-1' | ||
batch { | ||
cliPath = '/home/ec2-user/miniconda/bin/aws' | ||
} | ||
} | ||
EOF | ||
|
||
|
||
NXF_VER=23.10.1 nextflow run \ | ||
viash-io/test-nextflow-wave-fusion \ | ||
-r main_build \ | ||
-main-script target/nextflow/method/main.nf \ | ||
-profile docker \ | ||
-w $WORK \ | ||
-c $NXF_CONFIG \ | ||
-latest \ | ||
--input $RES/input1.txt \ | ||
--multiple_input "$RES/input1.txt;$RES/input2.txt" \ | ||
--publish_dir "$TMPOUT" | ||
|
||
# sync output | ||
echo "Syncing output" | ||
aws s3 sync $TMPOUT $OUT | ||
|
||
# check if output is correct | ||
echo "Checking output" | ||
scripts/verify_output.sh "$OUT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
scripts/run_local-code_local-input_s3-output_s3-work_local.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_name=$(basename "$0") | ||
TMPOUT=s3://data-intuitive-tmp/test-nextflow-wave-fusion/output/${script_name%.sh} | ||
OUT=output/${script_name%.sh} | ||
RES=s3://data-intuitive-tmp/test-nextflow-wave-fusion/resources | ||
|
||
# clear output dir | ||
echo "Clearing output directory" | ||
aws s3 rm $TMPOUT --recursive | ||
[ -d "$OUT" ] && rm -r "$OUT" | ||
|
||
# run component | ||
echo "Running component" | ||
NXF_VER=23.10.1 nextflow run \ | ||
. \ | ||
-main-script target/nextflow/method/main.nf \ | ||
-profile docker \ | ||
-latest \ | ||
--input $RES/input1.txt \ | ||
--multiple_input "$RES/input1.txt;$RES/input2.txt" \ | ||
--publish_dir "$TMPOUT" | ||
|
||
# sync output | ||
echo "Syncing output" | ||
aws s3 sync $TMPOUT $OUT | ||
|
||
# check if output is correct | ||
echo "Checking output" | ||
scripts/verify_output.sh "$OUT" |
51 changes: 51 additions & 0 deletions
51
scripts/run_local-code_local-input_s3-output_s3-work_s3.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_name=$(basename "$0") | ||
TMPOUT=s3://data-intuitive-tmp/test-nextflow-wave-fusion/output/${script_name%.sh} | ||
OUT=output/${script_name%.sh} | ||
RES=s3://data-intuitive-tmp/test-nextflow-wave-fusion/resources | ||
WORK=s3://data-intuitive-tmp/test-nextflow-wave-fusion/work/${script_name%.sh} | ||
NXF_CONFIG=/tmp/${script_name%.sh}.config | ||
|
||
# clear output dir | ||
echo "Clearing output directory" | ||
aws s3 rm $TMPOUT --recursive | ||
[ -d "$OUT" ] && rm -r "$OUT" | ||
|
||
echo "aws profile: $AWS_PROFILE" | ||
|
||
# create config | ||
cat > $NXF_CONFIG <<EOF | ||
fusion { | ||
enabled = true | ||
exportStorageCredentials = true | ||
} | ||
wave { | ||
enabled = true | ||
} | ||
EOF | ||
|
||
|
||
# run component | ||
echo "Running component" | ||
NXF_VER=23.10.1 nextflow run \ | ||
. \ | ||
-main-script target/nextflow/method/main.nf \ | ||
-profile docker \ | ||
-latest \ | ||
-w $WORK \ | ||
-c $NXF_CONFIG \ | ||
--input $RES/input1.txt \ | ||
--multiple_input "$RES/input1.txt;$RES/input2.txt" \ | ||
--publish_dir "$TMPOUT" | ||
|
||
# sync output | ||
echo "Syncing output" | ||
aws s3 sync $TMPOUT $OUT | ||
|
||
# check if output is correct | ||
echo "Checking output" | ||
scripts/verify_output.sh "$OUT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters