diff --git a/001-Jupyter/FAQ_Howto-load-additional-software-modules.ipynb b/001-Jupyter/FAQ_Howto-load-additional-software-modules.ipynb index 7e10c617dc55395742a703689ddee541a3bba741..4e16e9bee36341e9b31fc415f805ed2071971dee 100644 --- a/001-Jupyter/FAQ_Howto-load-additional-software-modules.ipynb +++ b/001-Jupyter/FAQ_Howto-load-additional-software-modules.ipynb @@ -88,18 +88,18 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "JupyterLab is made of a **front-end** running in your browser using JavaScript+HTML. This is the actual user interface - one could say that its purpose is nothing else than making JupyterLab visible to you. \n", - "and a **back-end** running on any machine your browser can connect to. That can be the same machine the browser runs on, it can be a cloud server or -in our case - the hpc cluster. \n", + "JupyterLab is made of a **front-end** running in your browser using JavaScript+HTML. This is the actual user interface - one could say that its purpose is nothing else than making JupyterLab visible to you and a **back-end** running on any machine your browser can connect to. \n", + "This back-end machine can be the same machine the browser runs on, it can be a cloud server or -in our case - the hpc cluster. \n", "\n", - "The actual code of a Jupyter notebook is executed in a **separate process** called Jupyter Kernel running in a complete **separate shell** \n", - "and communicates with the Jupyter Notebook Server through a Jupyter-specific messaging protocol. \n", + "The actual code cells of your Jupyter notebook are executed in a **separate process** called Jupyter Kernel. \n", + "The Jupyter Kernel runs in a complete **separate shell** and communicates with the Jupyter Notebook Server through a protocol with Jupyter-specific messages.\n", "\n", "<div class=\"alert alert-block alert-info\">\n", "<b>Attention:</b></br>\n", "If you want to use a software module in your Jupyter Notebook, it must be loaded in the Jupyter Kernel's shell/environment.\n", "</div>\n", "\n", - "There are multiple ways to load software modules into the shell/environment of the Jupyter Kernel.\n", + "There are multiple ways to load software modules into the shell/environment of the Jupyter Kernel. \n", "Prioritized by best approach, the options are as follows:\n", "- create your own Jupyter Kernel\n", "- use the lmod extension\n", @@ -115,12 +115,12 @@ "source": [ "#### Create your own kernel\n", "\n", - "If the standard kernel do not provide all software modules you need for your work, \n", + "If the standard kernels do not provide all software modules you need for your work, \n", "you can create your own Jupyter Kernel and load the needed software modules before you start it.\n", "\n", "<div class=\"alert alert-block alert-success\">\n", "<b>Solution \"own kernel\":</b></br>\n", - "The bottom line is that a Jupyter kernel is described by no more than a JSON file. There you will find the command call that starts the kernel.</br> \n", + "A Jupyter kernel is described in principle by no more than a JSON file. There you will find the command call that starts the kernel.</br> \n", "This command call can easily be a script, which calls a few extra `module load <..>` before.\n", "</div>\n", "\n", @@ -138,10 +138,10 @@ "metadata": {}, "source": [ "#### lmod extension\n", - "The [lmod extension](https://github.com/cmd-ntrf/jupyter-lmod) allows user to load/unload software modules **before** launching kernels. \n", + "The [lmod extension](https://github.com/cmd-ntrf/jupyter-lmod) allows users to load/unload software modules **before** launching kernels. \n", "You can find its UI in the left sidebar.\n", "\n", - "A Jupyter Kernel copies the environment variables of the Jupyter Notebook Server to its own separate shell. \n", + "A Jupyter Kernel copies the environment variables of the Jupyter Notebook Server to its own separate shell when it starts up. \n", "The extension takes advantage of that and modifies the current environment of the Jupyter Notebook Server.\n", "\n", "<div class=\"alert alert-block alert-warning\">\n", @@ -163,7 +163,7 @@ "As you already know from the description above on the lmod extention: \n", "A Jupyter Kernel copies the environment variables of the Jupyter Notebook Server to its own separate shell when it starts up. \n", "\n", - "Therefor, any software module loaded in the Jupyter Notebook Server's environment will likely be available through a standard Jupyter Kernel, too. \n", + "Therefor, any software module loaded in the Jupyter Notebook Server's environment will likely be available in a standard Jupyter Kernel, too. \n", "If you have ensured that the extra software modules are loaded **before** JupyterLab is started. \n", "\n", "**But** Jupyter-JSC hides the startup of JupyterLab - it loads modules and starts JupyterLab in the background. \n", @@ -182,6 +182,7 @@ "\n", "module load <...>\n", "```\n", + "\n", "<div class=\"alert alert-block alert-warning\">\n", "<b>Attention \"modify startup\":</b></br>\n", "- the software modules are loaded <b>every time</b></br>\n", @@ -201,7 +202,7 @@ "source": [ "#### Restart the Jupyter Kernel's process from within the Jupyter notebook\n", "\n", - "If you love to live dangerously, then you can also secretly change the environment of a running Jupyter Kernel's environment.\n", + "If you love to live dangerously, then you can also secretly change the environment of a running Jupyter Kernel's environment. \n", "At least for Python there is a way to ask the current running Python interpreter to restart itself within a new/modified environment.\n", "\n", "Please check this howto for details: [tricks with os.execve](https://gitlab.version.fz-juelich.de/jupyter4jsc/j4j_notebooks/-/blob/master/001-Jupyter/Modify_JupyterKernel_at_NotebookRuntime.ipynb)\n", @@ -210,7 +211,7 @@ "<b>Attention \"os.execve\":</b></br>\n", "- only works with Python</br>\n", "- is more a hack than a solution</br>\n", - "- pollutes the beginning your Jupyter notebooks</br>\n", + "- \"pollutes\" the first code cells of your Jupyter notebooks the hack's commands</br>\n", "</div>" ] }