You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
5
5
6
6
1. Install the official `jupyter-xblock <https://github.com/overhangio/jupyter-xblock/>`__ in the Open edX LMS and Studio.
7
7
2. Run a Docker-based `JupyterHub <https://jupyterhub.readthedocs.io/en/stable/>`__ instance with a `Docker spawner <https://jupyterhub-dockerspawner.readthedocs.io/en/latest/>`__.
8
8
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.
10
10
11
11
⚠️ 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.
12
12
13
13
Installation
14
14
------------
15
15
16
-
::
16
+
.. code-block:: bash
17
17
18
18
tutor plugins install jupyter
19
19
20
20
Usage
21
21
-----
22
22
23
-
Enable the plugin::
23
+
Enable the plugin:
24
+
25
+
.. code-block:: bash
24
26
25
27
tutor plugins enable jupyter
26
28
27
-
Re-build the "openedx" Docker image to install the Jupyter XBlock::
29
+
Re-build the "openedx" Docker image to install the Jupyter XBlock:
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
88
97
89
98
from tutor import hooks
90
99
@@ -98,7 +107,9 @@ The configuration template for the JupyterHub instance is stored in `jupyterhub_
98
107
)
99
108
)
100
109
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
102
113
103
114
from tutor import hooks
104
115
@@ -112,15 +123,19 @@ To modify the "jupyterhub" Docker image and add extra Python packages (for examp
112
123
)
113
124
)
114
125
115
-
Then build the JupyterHub image again::
126
+
Then build the JupyterHub image again:
127
+
128
+
.. code-block:: bash
116
129
117
130
tutor config save
118
131
tutor images build jupyterhub
119
132
120
133
Lab environment
121
134
~~~~~~~~~~~~~~~
122
135
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
124
139
125
140
from tutor import hooks
126
141
@@ -134,7 +149,9 @@ By default, Jupyter lab notebooks will be spawned that do not include extra Pyth
0 commit comments