Skip to main content

JupyterLab

Install Jupyter Kernels

Jupyter Kernels is a JupyterLab extension. To install it, just run the following command in your terminal.

pip install jupyter-kernels

You will need python>=3.9 and pip available on your machine.

Launch JupyterLab

Launch JupyterLab as usual.

jupyter lab

JupyterLab Launcher

JupyterLab users are used to go the their launcher which present typical tiles to create a Notebook and launch a Kernel.

Jupyter Kernels introduces a new element at the top of the JupyterLab launcher.

Datalayer Account

The first step is to authenticate with Datalayer.

If this is your fist contact with Datalayer, you will need an account. Just fill in a few details and check your mailbox for the confirmation code.

Serverless

Once authenticated, Datalayer takes care of the rest and will create the needed services for you on its own infrastructure.

You don't have to worry on anything, just wait on the green light that should appear on your Home page.

Kernels

Once the services are available, it may take a bit of time to have your kernels up-and-running. For now, we offer you 3 differents remote kernels.

The Home page also list your local machine Kernels, and will offer in next releases the ability to create local browser Kernels.

Remote Kernels

Jupyter Kernels creates a predefined Remote Kernels from your local JupyterLab.

Notebooks

To ease the onboarding, you can create example of Notebooks clicking on the Example buttons.

This step is of course completely optional and you are welcome to directly use your own Notebooks.

You can use the Kernels from the standard JupyterLab kernel picker.

Click on the top-right picker of the Notebook, and assign a Kernel to Notebook (the Remote Kernels are listed at the top).

Local Files

note

Highly experimental.

  • You need a local SSH Server.
  • 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.
  • ssh from you local machine on your user account has to work without prompt

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
# ...

Then you have to select a kernel and toggle the mount button.

If everything goes well, 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)
[00004] READDIR
[00005] READDIR
[00004] NAME 3675bytes (103ms)
[00005] STATUS 32bytes (103ms)
[00006] READDIR
[00007] READDIR
[00008] CLOSE
[00006] STATUS 32bytes (99ms)
[00007] STATUS 32bytes (99ms)
[00008] STATUS 28bytes (99ms)

Kernel Lifecycle

You can delete a Kernel.

We will support the start as pause of the Kernel.

note

Kernel start and pause is not supported in the current release.

Need Help?

Contact us for support, we are here to help.