Skip to content

Commit 6a83838

Browse files
author
Edly
committed
Merge remote-tracking branch 'origin/release'
2 parents 225810b + 8e825fc commit 6a83838

1 file changed

Lines changed: 30 additions & 13 deletions

File tree

README.rst

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,46 @@
11
Jupyter Notebook plugin for `Tutor <https://docs.tutor.edly.io>`__
2-
======================================================================
2+
===================================================================
33

44
This is a plugin for Tutor that makes it easy to integrate `Jupyter <https://jupyter.org/>`__ notebooks in `Open edX <https://openedx.org>`__. It achieves the following:
55

66
1. Install the official `jupyter-xblock <https://github.com/overhangio/jupyter-xblock/>`__ in the Open edX LMS and Studio.
77
2. Run a Docker-based `JupyterHub <https://jupyterhub.readthedocs.io/en/stable/>`__ instance with a `Docker spawner <https://jupyterhub-dockerspawner.readthedocs.io/en/latest/>`__.
88

9-
In pratice, it means that students will be allocated Docker containers with limited CPU and memory to run their custom notebooks.
9+
In practice, it means that students will be allocated Docker containers with limited CPU and memory to run their custom notebooks.
1010

1111
⚠️ Compatibility with Kubernetes was not battle-tested. Please report any issue you face. For a more production-ready Kubernetes environment, you are encouraged to check the documentation of the `Zero to JupyterHub with Kubernetes <https://z2jh.jupyter.org/en/stable/resources/reference.html>`__ project.
1212

1313
Installation
1414
------------
1515

16-
::
16+
.. code-block:: bash
1717
1818
tutor plugins install jupyter
1919
2020
Usage
2121
-----
2222

23-
Enable the plugin::
23+
Enable the plugin:
24+
25+
.. code-block:: bash
2426
2527
tutor plugins enable jupyter
2628
27-
Re-build the "openedx" Docker image to install the Jupyter XBlock::
29+
Re-build the "openedx" Docker image to install the Jupyter XBlock:
30+
31+
.. code-block:: bash
2832
2933
tutor images build openedx
3034
31-
Launch your platform again::
35+
Launch your platform again:
36+
37+
.. code-block:: bash
3238
3339
tutor local launch
3440
35-
Print the default passport ID::
41+
Print the default passport ID:
42+
43+
.. code-block:: bash
3644
3745
echo "$(tutor config printvalue JUPYTER_DEFAULT_PASSPORT_ID):$(tutor config printvalue JUPYTER_LTI_CLIENT_KEY):$(tutor config printvalue JUPYTER_LTI_CLIENT_SECRET)"
3846
@@ -41,7 +49,6 @@ Make a note of the printed value. Go to the Studio Tools ➡️ Advanced Setting
4149
.. image:: https://raw.githubusercontent.com/overhangio/jupyter-xblock/main/static/screenshots/studio-advanced-settings-lti.png
4250
:alt: Studio advanced settings
4351

44-
4552
In "Advanced Module List" add "jupyter" (with quotes):
4653

4754
.. image:: https://raw.githubusercontent.com/overhangio/jupyter-xblock/main/static/screenshots/studio-advanced-settings.png
@@ -84,7 +91,9 @@ Unique, user-specific settings:
8491
JupyterHub
8592
~~~~~~~~~~
8693

87-
The configuration template for the JupyterHub instance is stored in `jupyterhub_config.py <./tutorjupyter/templates/jupyter/apps/jupyterhub_config.py>`__. This template file includes a ``{{ patch("jupyterhub-config") }}`` statement, which means that its contents can be overridden by creating an ad-hoc Tutor plugin. For instance, to add custom LTI keys to your JupyterHub instance::
94+
The configuration template for the JupyterHub instance is stored in `jupyterhub_config.py <./tutorjupyter/templates/jupyter/apps/jupyterhub_config.py>`__. This template file includes a ``{{ patch("jupyterhub-config") }}`` statement, which means that its contents can be overridden by creating an ad-hoc Tutor plugin. For instance, to add custom LTI keys to your JupyterHub instance:
95+
96+
.. code-block::python
8897
8998
from tutor import hooks
9099
@@ -98,7 +107,9 @@ The configuration template for the JupyterHub instance is stored in `jupyterhub_
98107
)
99108
)
100109
101-
To modify the "jupyterhub" Docker image and add extra Python packages (for example), you should create a Tutor plugin that implements the "jupyterhub-dockerfile" patch::
110+
To modify the "jupyterhub" Docker image and add extra Python packages (for example), you should create a Tutor plugin that implements the "jupyterhub-dockerfile" patch:
111+
112+
.. code-block::python
102113
103114
from tutor import hooks
104115
@@ -112,15 +123,19 @@ To modify the "jupyterhub" Docker image and add extra Python packages (for examp
112123
)
113124
)
114125
115-
Then build the JupyterHub image again::
126+
Then build the JupyterHub image again:
127+
128+
.. code-block:: bash
116129
117130
tutor config save
118131
tutor images build jupyterhub
119132
120133
Lab environment
121134
~~~~~~~~~~~~~~~
122135

123-
By default, Jupyter lab notebooks will be spawned that do not include extra Python packages or dependencies. To modify the "jupyterlab" Docker image and add extra Python packages (for example), you should create a Tutor plugin that implements the "jupyterlab-dockerfile" patch::
136+
By default, Jupyter lab notebooks will be spawned that do not include extra Python packages or dependencies. To modify the "jupyterlab" Docker image and add extra Python packages (for example), you should create a Tutor plugin that implements the "jupyterlab-dockerfile" patch:
137+
138+
.. code-block::python
124139
125140
from tutor import hooks
126141
@@ -134,7 +149,9 @@ By default, Jupyter lab notebooks will be spawned that do not include extra Pyth
134149
)
135150
)
136151
137-
Then build the lab image again::
152+
Then build the lab image again:
153+
154+
.. code-block:: bash
138155
139156
tutor config save
140157
tutor images build jupyterlab

0 commit comments

Comments
 (0)