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

Add a --volume flag to modal shell #2067

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Conversation

mwaskom
Copy link
Contributor

@mwaskom mwaskom commented Aug 2, 2024

Supports modal shell --volume ... to quickly attach one (or more) of your volumes to an add-hoc shell for filesystem exploration:

$ modal shell --volume example-models
root@modal:/# ls /mnt/example-models
gpt5.pt  gpt6.pt

You can call it multiple times, like modal shell --volume models --volume data

Volumes are always mounted at /mnt/{name}. I considered making this configurable, e.g. modal shell --volume /mnt/data:my-data-vol. But that felt like overkill for something that targets quick work. If we find a need for it, I think it's fine to expand the interface in the future to allow it. We're reasonably strict about volume names and I think any valid volume name would also be a valid mount point? (Open to counter-arguments here !).

  • Closes MOD-2404

Changelog

  • Volumes can now be mounted to an ad hoc modal shell session:

    modal shell --volume my-vol-name
    

    When the shell starts, the volume will be mounted at /mnt/my-vol-name. This may be helpful for shell-based exploration or manipulation of volume contents.

    Note that the option can be used multiple times to mount additional models:

    modal shell --volume models --volume data
    

Copy link

@modal-pr-review-automation modal-pr-review-automation bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved 👍. This diff qualified for automatic approval and doesn't need follow up review.

@charlesfrye
Copy link
Contributor

¿como se llamas?

Screenshot 2024-08-02 at 1 27 25 PM

This is great. I agree on the auto-mounting.

@charlesfrye charlesfrye merged commit feb0342 into main Aug 2, 2024
23 checks passed
@charlesfrye charlesfrye deleted the michael/modal-shell-volumes branch August 2, 2024 17:50
Copy link
Contributor

@charlesfrye charlesfrye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@erikbern
Copy link
Contributor

erikbern commented Aug 3, 2024

nice!

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.

4 participants