-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add a topic on jupyter-lmod in documentation #640
Open
cmd-ntrf
wants to merge
8
commits into
TACC:main
Choose a base branch
from
cmd-ntrf:jupyter-lmod_docs
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8bc87ff
Draft ideas for jupyter-lmod docs in Lmod
cmd-ntrf fcdc839
Improve jupyter-lmod doc draft
cmd-ntrf e933d07
Typo
cmd-ntrf 7a21881
Add clarification on PYTHONPATH
cmd-ntrf c1381e0
Update docs
cmd-ntrf 50efcf3
Add doc on dynamic launcher buttons
cmd-ntrf 3b11c1c
Fix typos
cmd-ntrf 339cc86
Update docs
cmd-ntrf File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,50 @@ | ||||||||||||||||||
Jupyter and Lmod | ||||||||||||||||||
================ | ||||||||||||||||||
|
||||||||||||||||||
It is possible to use Lmod inside of Jupyter with the terminal or jupyter-lmod. | ||||||||||||||||||
|
||||||||||||||||||
jupyter-lmod is a frontend and server extension for Jupyter (notebook and jupyterlab). | ||||||||||||||||||
The extension provides most of Lmod functionalities graphically: | ||||||||||||||||||
- Browser and filter available modules | ||||||||||||||||||
- Load and unload modules | ||||||||||||||||||
- Display a module content | ||||||||||||||||||
- Create and load collections | ||||||||||||||||||
|
||||||||||||||||||
Installation | ||||||||||||||||||
~~~~~~~~~~~~ | ||||||||||||||||||
|
||||||||||||||||||
To install jupyter-lmod extension: :: | ||||||||||||||||||
|
||||||||||||||||||
pip install jupyterlmod | ||||||||||||||||||
cmd-ntrf marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
|
||||||||||||||||||
This enables the extension for both Jupyter Notebook and JupyterLab. | ||||||||||||||||||
|
||||||||||||||||||
How does it work? | ||||||||||||||||||
~~~~~~~~~~~~~~~~~ | ||||||||||||||||||
|
||||||||||||||||||
jupyter-lmod uses lmod python interface to generate Python code | ||||||||||||||||||
that modifies the environment variables of the Python process running Jupyter. All child | ||||||||||||||||||
processes of Jupyter (including kernels) created after Lmod calls inherit | ||||||||||||||||||
the environment variables as defined by the set of loaded modules. | ||||||||||||||||||
cmd-ntrf marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+29
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence is a bit confusing, I suggest to simplify it:
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
Lmod environment variable configuration for jupyter-lmod | ||||||||||||||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||||||||||||||
|
||||||||||||||||||
The plugin requires the environment variable **$LMOD_CMD** to be defined when Jupyter starts, | ||||||||||||||||||
plus all environment variables required by Lmod to work properly (i.e.: **$MODULEPATH**). | ||||||||||||||||||
|
||||||||||||||||||
Some JupyterHub spawners do not setup the complete user's environment, leaving **$LMOD_CMD** | ||||||||||||||||||
and **$MODULEPATH** undefined. To address this issue, the environment variables have to be | ||||||||||||||||||
defined in **jupyterhub_config.py** using | ||||||||||||||||||
`c.Spawner.environment <https://jupyterhub.readthedocs.io/en/stable/api/spawner.html#jupyterhub.spawner.Spawner.environment>`_. | ||||||||||||||||||
|
||||||||||||||||||
If the environment variables are defined before JupyterHub launch, you can add their | ||||||||||||||||||
name only to `c.Spawner.env_keep <https://jupyterhub.readthedocs.io/en/stable/api/spawner.html#jupyterhub.spawner.Spawner.env_keep>`_ | ||||||||||||||||||
instead. | ||||||||||||||||||
|
||||||||||||||||||
References | ||||||||||||||||||
~~~~~~~~~~ | ||||||||||||||||||
|
||||||||||||||||||
For more information, refer to jupyter-lmod github repo: | ||||||||||||||||||
https://www.github.com/cmd-ntrf/jupyter-lmod | ||||||||||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a link to your repo from the start 🙂