-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@johanneskoester I'm trying to get this working with gcs, but I'm hitting issues about flags from snakemake: ```console __main__.py: error: unrecognized arguments: --storage-s3-retries ``` We are installing the latest snakemake from main. Thanks! Signed-off-by: vsoch <[email protected]> Co-authored-by: vsoch <[email protected]>
- Loading branch information
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
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,7 @@ | ||
# Landsat Example | ||
|
||
Here is an example specifying to use an s3 bucket | ||
|
||
```bash | ||
snakemake --jobs 1 --executor googlebatch --googlebatch-region us-central1 --googlebatch-project llnl-flux --default-storage-provider gcs --default-storage-prefix gcs://change-me --storage-gcs-project llnl-flux | ||
``` |
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,45 @@ | ||
import os | ||
|
||
storage: | ||
provider="gcs", | ||
max_requests_per_second= None | ||
|
||
rule all: | ||
input: | ||
"landsat-data.txt.bz2", | ||
"testdir" | ||
|
||
rule copy: | ||
input: | ||
storage.gcs("gcs://gcp-public-data-landsat/LC08/01/001/003/LC08_L1GT_001003_20170430_20170501_01_RT/LC08_L1GT_001003_20170430_20170501_01_RT_MTL.txt"), | ||
output: | ||
"landsat-data.txt" | ||
resources: | ||
mem_mb=100 | ||
run: | ||
# we could test volume size like this but it is currently unclear what f1-micro instances provide as boot disk size | ||
#stats = os.statvfs('.') | ||
#volume_gib = stats.f_bsize * stats.f_blocks / 1.074e9 | ||
#assert volume_gib > 90 | ||
shell("cp {input} {output}") | ||
|
||
rule pack: | ||
input: | ||
"landsat-data.txt" | ||
output: | ||
"landsat-data.txt.bz2" | ||
conda: | ||
"env.yml" | ||
log: | ||
"logs/pack.log" | ||
shell: | ||
"bzip2 -c {input} > {output}; echo successful > {log}" | ||
|
||
|
||
rule directory: | ||
output: | ||
directory("testdir") | ||
log: | ||
"logs/directory.log" | ||
shell: | ||
"mkdir -p {output}; touch {output}/test.txt" |
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 @@ | ||
{"message": "hahaha"} |
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,4 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- bzip2 |