allow to mount host volumes in AWS Batch #640
Merged
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.
What does this PR do?
Adds an option to
@batch
decorator to mount host volumes inside the container.@batch(mount_host_volumes="/mnt/")
. This way,/mnt
from host will be mounted at/mnt
inside the container. This (partially) addresses #441In this release this is considered an advanced feature due to less friendly UX and the fact that troubleshooting this requires a decent knowledge of AWS Batch.
I've tested this on Batch and Step Functions and it seems to work!
Potential improvements in future PRs, not included here
First class support for per-job EFS mounts. Not included this because the configuration is pretty hairy, needs some extra thinking. However, you should be able to use this PR as is to expose EFS volumes mounted at host to containers, as described here.
Support for customizing mount points inside a container. Right now
/mnt
from host always gets mounted as/mnt
inside the container.