Skip to main content

Local Storage

warning

Highly experimental.

  • You need a local SSH Server.
  • ssh from you local machine on your user account has to work without prompt.
  • Once a folder is mounted, you'd better restart your server to unmount it (we are working on a better implementation).
  • Windows is not supported for now.

To mount your Local Files to the Remote Kernel, a SSH Server must be running on your local machine (on port 22) and you must be able to connect without password prompt from your local terminal.

# Has to connect without password prompt.
ssh localhost
# ...

Here are a few actions to take to ensure connecting securlty to your localhost without password.

# Add you public key into the authorized_keys
ssh-copy-id $USER@localhost
# Check the permissions of your ~/.ssh content
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/known_hosts

Then select a Kernel and toggle the mount button.

Your Jupyter Server should show logs similar to this.

...
Extension: posix-rename@openssh.com <1>
Extension: statvfs@openssh.com <2>
Extension: fstatvfs@openssh.com <2>
Extension: hardlink@openssh.com <1>
Extension: fsync@openssh.com <1>
Extension: lsetstat@openssh.com <1>
remote_uid = 501
note

For now, your local folder is mounted on the remote subfolder ./content/local.

This will change in the next release to allow direct import of python files from the notebooks.

Please note that you can only have one mounted kernel at the time.

You can check that a successfull mount by listing the files running a ls from a cell. You should see your local files.

You can run more sanity checks by printing os.cwd().

You can run more sanity checks by printing sys.path().

Please be wyse when writing big files on the mounted folders, as the files are synchronised across the network. Don't put e.g. big datasets like heavy images, videos... The server prints details when content is transfered to synchronise the files.

[I 2023-11-27 07:36:43.906 YDocExtension] Saving file: index.ipynb
[00002] LSTAT
[00002] ATTRS 41bytes (142ms)
[00003] OPENDIR
[00003] HANDLE 17bytes (100ms)
...
[00008] STATUS 28bytes (99ms)