runner.aws_batch: Download .snakemake/storage/ too#460
Merged
joverlee521 merged 1 commit intomasterfrom Jul 22, 2025
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
joverlee521
added a commit
to nextstrain/docker-base
that referenced
this pull request
Jul 18, 2025
When using Snakemakes storage support to download remote files, Snakemake stores the downloaded files in `.snakemake/storage` by default. This allows users to keep the remote files that were downloaded during the build on AWS Batch. Note that the storage path is configurable via Snakemake's `--local-storage-prefix`.¹ So if someone configures the storage path to a custom path within `.snakemake`, e.g. `.snakemake/foo`, then it would not be available in their workdir. I'm not sure it's even possible to make this path configurable here, so I'm just going to warn against using it from the Nextstrain CLI. Related to nextstrain/cli#460 ¹ <https://github.com/snakemake/snakemake/blob/v9.6.3/src/snakemake/cli.py#L1463-L1469>
1 task
d57d4fb to
51746ab
Compare
joverlee521
added a commit
to nextstrain/docker-base
that referenced
this pull request
Jul 18, 2025
When using Snakemakes storage support to download remote files, Snakemake stores the downloaded files in `.snakemake/storage` by default. This allows users to keep the remote files that were downloaded during the build on AWS Batch. Note that the storage path is configurable via Snakemake's `--local-storage-prefix`.¹ So if someone configures the storage path to a custom path within `.snakemake`, e.g. `.snakemake/foo`, then it would not be available in their workdir. I'm not sure it's even possible to make this path configurable here, so I'm just going to warn against using it from the Nextstrain CLI. Related to nextstrain/cli#460 ¹ <https://github.com/snakemake/snakemake/blob/v9.6.3/src/snakemake/cli.py#L1456-L1462>
joverlee521
commented
Jul 18, 2025
jameshadfield
approved these changes
Jul 20, 2025
Member
jameshadfield
left a comment
There was a problem hiding this comment.
Didn't test, but looks good
Contributor
Author
|
Tested this locally
|
51746ab to
67df55b
Compare
When using Snakemakes storage support to download remote files, Snakemake stores the downloaded files in `.snakemake/storage` by default. This allows users to keep the remote files that were downloaded during the build on AWS Batch. Note that the storage path is configurable via Snakemake's `--local-storage-prefix`.¹ So if someone configures the storage path to a custom path within `.snakemake`, e.g. `.snakemake/foo`, then it would not be available in their downloaded workdir. I'm not even sure it's possible to configure the path in entrypoint-aws-batch for the docker-base image, so I've added a warning against using the Snakemake option if using the aws-batch runtime. Resolves #453 Related to nextstrain/docker-base#259 ¹ <https://github.com/snakemake/snakemake/blob/v9.6.3/src/snakemake/cli.py#L1463-L1469>
67df55b to
4189085
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
When using Snakemakes storage support to download remote files, Snakemake stores the downloaded files in
.snakemake/storageby default. This allows users to keep the remote files that were downloaded during the build on AWS Batch.Note that the storage path is configurable via Snakemake's
--local-storage-prefix.¹ So if someone configures the storage path to a custom path within.snakemake, e.g..snakemake/foo, then it would not be available in their downloaded workdir. I'm not even sure it's possible to configure the path in entrypoint-aws-batch for the docker-base image, so I've added a warning against using the Snakemake option if using the aws-batch runtime.Resolves #453
Depends on nextstrain/docker-base#259
¹ https://github.com/snakemake/snakemake/blob/v9.6.3/src/snakemake/cli.py#L1456-L1462
Checklist