Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specs,schedulers: add VolumeMount #426

Closed
wants to merge 1 commit into from
Closed

specs,schedulers: add VolumeMount #426

wants to merge 1 commit into from

Conversation

d4l3k
Copy link
Member

@d4l3k d4l3k commented Mar 16, 2022

This adds a new mount type volume which allows mounting named volumes onto the container environment. It also updates the documentation for each scheduler to include mount support.

Per scheduler:

  • Docker: named volume
  • Kubernetes: PersistentVolumeClaimVolume
  • AWS Batch: EFS ID - I'm a little hesitant on this since batch may add other volume types such as FSx etc

Closes #422

Test plan:

added unit tests

CI

(torchx) tristanr@tristanr-arch2 ~/D/torchx-proj> torchx run --scheduler local_docker --wait --log dist.ddp -j 1x1 --script foo.py --mount type=volume,src=fo
o2,dst=/tmp
torchx 2022-03-15 17:23:42 INFO     loaded configs from /home/tristanr/Developer/torchx-proj/.torchxconfig
torchx 2022-03-15 17:23:42 INFO     Building workspace: file:///home/tristanr/Developer/torchx-proj for role[0]: foo, image: ghcr.io/pytorch/torchx:0.1.2dev0
torchx 2022-03-15 17:23:44 INFO     Done building workspace
torchx 2022-03-15 17:23:44 INFO     New image: sha256:82c6b984bd64c9c38aa86c4cb855b88ce3d62c65c50519372cd63f382d4bb71c built from workspace
local_docker://torchx/foo-nn5vkq7sc2xz9c
torchx 2022-03-15 17:23:45 INFO     Waiting for the app to finish...
foo/0 [0]:hello
torchx 2022-03-15 17:23:51 INFO     Job finished: SUCCEEDED
(torchx) tristanr@tristanr-arch2 ~/D/torchx-proj> docker volume ls | rg foo2
local     foo2

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 16, 2022
@d4l3k d4l3k force-pushed the persistentvolume branch from 69e1ed2 to e6ac408 Compare March 16, 2022 00:29
@facebook-github-bot
Copy link
Contributor

@d4l3k has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #426 (e6ac408) into main (354d26e) will increase coverage by 0.00%.
The diff coverage is 90.32%.

@@           Coverage Diff           @@
##             main     #426   +/-   ##
=======================================
  Coverage   94.40%   94.41%           
=======================================
  Files          67       67           
  Lines        3805     3829   +24     
=======================================
+ Hits         3592     3615   +23     
- Misses        213      214    +1     
Impacted Files Coverage Δ
torchx/components/dist.py 79.54% <ø> (ø)
torchx/specs/__init__.py 96.15% <ø> (ø)
torchx/schedulers/aws_batch_scheduler.py 84.18% <80.00%> (+0.85%) ⬆️
torchx/schedulers/docker_scheduler.py 95.74% <80.00%> (-0.46%) ⬇️
torchx/schedulers/kubernetes_scheduler.py 92.64% <80.00%> (-0.36%) ⬇️
torchx/specs/api.py 99.04% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 354d26e...e6ac408. Read the comment docs.

@d4l3k d4l3k added this to the 0.1.2 release milestone Mar 22, 2022
@d4l3k d4l3k deleted the persistentvolume branch April 13, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes: add support for persistent volume claim volumes
2 participants