Skip to content

entrypoint-aws-batch: Upload .snakemake/storage/ too #259

Merged
joverlee521 merged 2 commits intomasterfrom
aws-snakemake-storage
Jul 21, 2025
Merged

entrypoint-aws-batch: Upload .snakemake/storage/ too #259
joverlee521 merged 2 commits intomasterfrom
aws-snakemake-storage

Conversation

@joverlee521
Copy link
Copy Markdown
Contributor

@joverlee521 joverlee521 commented Jul 18, 2025

Description of proposed changes

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

Checklist

  • Checks pass

Somehow accidentally committed an extra file in 
ba793ad
joverlee521 added a commit to nextstrain/cli 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 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>
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
Copy link
Copy Markdown
Contributor Author

Worked as expected in nextstrain/cli#460 (comment)

@joverlee521 joverlee521 merged commit d2b5fc4 into master Jul 21, 2025
61 checks passed
@joverlee521 joverlee521 deleted the aws-snakemake-storage branch July 21, 2025 20:13
joverlee521 added a commit to nextstrain/cli that referenced this pull request Jul 21, 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 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>
joverlee521 added a commit to nextstrain/cli that referenced this pull request Jul 21, 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 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants