finch
finch copied to clipboard
Option to support volume mounts outside user $HOME
What is the problem you're trying to solve?. Currently, finch containers can only access resources inside user's home directory. I think there should be more flexibility in mount locations exposed by the virtual machine.
Describe the feature you'd like
Allow users to configure additional mount locations during VM start. These locations will be accessible to containers through commands such as finch run or finch cp.
Additional context
Adding an option to configure new mount locations in ${HOME}/.finch/finch.yaml seems like a good approach. And perhaps through a command line flag, for eg:
finch vm start -v /tmp/data
Not all the non-home directories have the use case of being workspace directories. Users mostly want to work in their customized non-home directories instead of system directories.
Also not all of them can be mounted to VM in Lima. For example, if Finch passes “/” as the mount point to Lima, it will return error.
FATA[0000] the YAML is invalid, saved the buffer as "lima.REJECTED.yaml": field `mounts[0].location` must not be a system path such as /etc or /usr
So I’d like a feature that makes non-home directories a field in Finch config. The new field name is TBD. Using "additional_workspace_locations" as example below.
An example yaml will be:
cpus: 4
memory: 4GiB
additional_workspace_locations:
- /Volumes/mydir