Xet Mount
Enable instant read access to huge data in seconds with our Xet mount feature.
What does mounting let me do?
Xet mount lets you easily explore the contents of any version of a repository without downloading everything. Mounted repositories appear as a browseable folder on your machine within seconds, ready to be used with any local tools. In the background, file contents are streamed and cached on demand, for even faster access on subsequent reads. The mount command can be used from your local machine or in the cloud, making it easy to move from local development to production without any code changes.
Mounts are read-only and cannot be modified. To modify a repository, follow the clone workflow.
How should I use Xet mount?
- Mount locally for easy access while conducting exploratory data analysis
- Mount in the cloud for fast data access during model training, especially for distributed training jobs
- Mount multiple versions of a repository and use local tools for detailed change analysis
Mounting a repository
note
Make sure that you have installed the git-xet extension and set your SSH keys prior to running these steps.
Navigate to the repository you want to access from the XetHub UI and click the Mount button to find the command.
On your local or cloud machine CLI, paste the command. It should look something like this:
git xet mount user@host:path/to/repo.git
By default, the main branch of the repository will be mounted with its name in the directory where the command was run. Here are some options you may want to add before running the command:
a. To check out an arbitrary branch or commit, add the following flag:
git xet mount user@host:path/to/repo.git -r [branch/commit]
b. To mount onto any other path, specify the preferred path:
git xet mount user@host:path/to/repo.git [path]
c. If the contents of the directory are Parquet, SQLite files or other file-types which provide tools with efficient random access, disabling prefetch is recommended for optimal performance:
git xet mount user@host:path/to/repo.git --prefetch 0
- Run the command. When the command is complete, it will print out the following message, as well as instructions on how to unmount.
Mount at "path/repo" successful. Unmount with 'umount "path/repo"'
- Congratulations! You've mounted a repository. Go forth and use any tools you want to explore your repository.
Unmounting a repository
You can unmount from your CLI or file explorer:
- From the CLI, use
umount "path/repo"
- From your file explorer, right-click the mounted object and select
Eject
If you are accessing the mounted files from an application while trying to unmount, the unmount or Eject command may fail. If this happens, you can force unmount with diskutil umount force "path/repo"
.