Skip to content

Commit d6ca3be

Browse files
committed
update scripts
1 parent ae390d9 commit d6ca3be

3 files changed

Lines changed: 27 additions & 5 deletions

File tree

scripts/get_task_execution.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
viash run src/core/fetch_task_execution/config.vsh.yaml -- \
4+
--input s3://openproblems-nextflow/work/f6/8565066aee4771cc2790b92b4ac660 \
5+
--output temp_debug_execution \
6+
--aws_profile op \
7+
--aws_credentials ~/.aws/credentials

src/core/fetch_task_execution/config.vsh.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ arguments:
1212
required: false
1313
direction: input
1414
description: The AWS profile to use for fetching the task execution directory.
15+
- type: file
16+
name: --aws_credentials
17+
required: false
18+
direction: input
19+
description: The AWS credentials file to use for fetching the task execution directory.
1520
- type: file
1621
name: --output
1722
required: true
@@ -21,6 +26,7 @@ resources:
2126
- type: bash_script
2227
path: script.sh
2328
engines:
24-
- type: native
29+
- type: docker
30+
image: amazon/aws-cli:latest
2531
runners:
2632
- type: executable
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
## VIASH START
22
par_input=s3://openproblems-nextflow/work/f6/8565066aee4771cc2790b92b4ac660
33
par_aws_profile=op
4+
par_aws_credentials=~/.aws/credentials
45
par_output=debug
56
## VIASH END
67

7-
aws s3 sync \
8-
${par_aws_profile:+--profile $par_aws_profile} \
9-
"$par_input" "$par_output"
8+
if [ -n "$par_aws_credentials" ]; then
9+
export AWS_SHARED_CREDENTIALS_FILE="$par_aws_credentials"
10+
fi
11+
12+
if [ -n "$par_aws_profile" ]; then
13+
export AWS_PROFILE="$par_aws_profile"
14+
fi
15+
16+
aws s3 sync "$par_input" "$par_output"
1017

1118
cd "$par_output"
1219

20+
# Replace the miniconda aws with the system aws
1321
sed -i 's#/home/ec2-user/miniconda/bin/aws#aws#g' .command.run
22+
# sed -i 's# s3 cp # s3 sync #g' .command.run
1423

15-
AWS_DEFAULT_PROFILE=${par_aws_profile} bash .command.run nxf_stage
24+
bash .command.run nxf_stage

0 commit comments

Comments
 (0)