Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ NEW: Add support for Jupyter kernel installation #5

Open
mbercx opened this issue May 19, 2023 · 0 comments
Open

✨ NEW: Add support for Jupyter kernel installation #5

mbercx opened this issue May 19, 2023 · 0 comments

Comments

@mbercx
Copy link
Member

mbercx commented May 19, 2023

Users often want to use Jupyter notebooks to run AiiDA calculations or perform analysis. It's possible to install jupyterlab in the Python environment where AiiDA is installed, but there are advantages to having one centralised Jupyter server running that can access all aiida-project environments:

  1. Only one active server needed, using less memory and other resources.
  2. Only have to configure the server once.
  3. Having access to all AiiDA projects is useful in case there is interaction between the projects.

IDE's like VSCode can make this really simple as well, but often also use quite a bit of resources to make this happen. Some tools like jupytext for writing notebooks in Markdown are also not supported quite as well in VSCode.

Typically you can install a kernel of a certain environment quite easily, see:

https://ipython.readthedocs.io/en/latest/install/kernel_install.html

However, to use a separated environment for AiiDA properly, You also have to set the env key in the kernel.json, e.g.:

{
 "argv": [
  "/home/aiida/.virtualenvs/aiida-super/bin/python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "aiida-super",
 "language": "python",
 "env": {"AIIDA_PATH": "/home/aiida/envs/aiida-super"}
}

Moreover, providing a user-friendly CLI for doing these kind of kernel installs will also make the process less painful and error-prone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant