Repository navigation
feat(compute): share folders of this computer with the local cluster - #533
Merged
Merged
Conversation
A workspace's computers could only mount claims that already existed, so raw content on this computer had to be copied into the cluster by hand. Settings > Compute now lists folders of this computer for the local cluster, each read-only or not. Its node mounts every folder below a directory of its own disk, the layout a pod in a user namespace can use, and provisioning creates a writable and a read-only claim for each. A workspace on the local cluster maps a folder to a mount path, read-only for that workspace when asked. Docker mounts a folder only into a container it creates, so changed folders ask for the cluster to be recreated and never replace it silently. Closes #531
5 tasks
…r dropdown Driving the app against the real local cluster showed two flaws in the volume row. The claim and mount path fields were cut off to a few characters, and nothing moved focus on from the folder dropdown. The row now sizes its fields and wraps, and Enter on the dropdown moves focus to the mount path once a folder is picked. Refs #531
edenreich
marked this pull request as ready for review
November 11, 2026 10:45
13 tasks
Contributor
|
🎉 This PR is included in version 0.66.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
A workspace's computers could only mount claims that already existed, so raw content on this computer had to be copied into the cluster by hand. The local cluster can now share folders of this computer with its workspaces, mounted straight from here with no copy, read-only for every workspace or for one.
Closes #531
How it reads in the app
/Users/you/Movies/raw -> /mnt/raw. Read-only there applies to that workspace alone. "An existing claim" stays available.Changes
backend/src/cluster_folders.rs-ClusterFolder(name,path,read_only), saved to~/.infer/cluster_folders.yaml, with the Docker mounts and the PersistentVolume and claim manifest derived from it. Each folder gets a writable claimfolder-<name>and a read-only claimfolder-<name>-ro.backend/src/local_cluster.rs- the node is created with the folders mounted. A cluster that runs with other folders is replaced only when asked, otherwise provisioning stops with a message.provision_local_clustertakesrecreateand applies the claims after the namespace exists. New commandscluster_folders,save_cluster_foldersandcluster_folders_pending.frontend/components/ClusterFolders.tsxon the Compute tab, with the warning and the two-step Recreate local cluster when the saved folders differ from the ones the cluster runs with.frontend/components/WorkspaceVolumes.tsx- on the local cluster a volume row maps a folder to a mount path, and a read-only volume is saved on the folder's read-only claim.AGENTS.mdDOM contract, README and a newe2e/tests/cluster-folders.yaml.Why the layout looks like this
A pod that runs with User data sits in its own user namespace, and every volume of such a pod must support id-mapped mounts. Docker Desktop shares a folder of this computer through a filesystem that does not, so the folder cannot be the volume itself. The two spike comments on #531 have the details. What works:
That is why a folder shows up one level below the mount path, as
<mount path>/<name>, and why read-only is a mount on the node and not only the pod's own flag.Notes for the reviewer
compute.yaml. The CLI rewrites that file from its own fields and would drop a key it does not know.folder-<name>and could only read throughfolder-<name>-ro. A folder that is read-only for every workspace refused writes through both claims. The claim lookup the workspace check runs found an existing claim and reported a missing one.--no-mock: Save folders, the warning, cancelling with Keep the cluster, the two-step recreate, mapping the folder to a mount path onubuntu-desktopread-only, the workspace check against the real claim, then removing it all again.Docs follow-up
inference-gateway/docs#1192