|
4 | 4 | Run XFCE (or other desktop environments) on a JupyterHub.
|
5 | 5 |
|
6 | 6 | This is based on https://github.com/ryanlovett/nbnovnc and a fork of https://github.com/manics/jupyter-omeroanalysis-desktop
|
| 7 | + |
| 8 | + |
| 9 | +## Docker |
| 10 | + |
| 11 | +To spin up such a notebook, please build and run the container like this. |
| 12 | + |
| 13 | +```bash |
| 14 | +$ docker build -t $(whoami)/$(basename ${PWD}) . |
| 15 | +Sending build context to Docker daemon 36.76MB |
| 16 | +Step 1/5 : FROM jupyter/datascience-notebook:latest |
| 17 | +**snip** |
| 18 | +Successfully installed aiohttp-3.6.2 async-timeout-3.0.1 jupyter-desktop-server-0.1.2 jupyter-server-proxy-1.5.0 multidict-4.7.6 simpervisor-0.3 yarl-1.4.2 |
| 19 | +Removing intermediate container ed906d6b1074 |
| 20 | + ---> 826211e74ce1 |
| 21 | +Successfully built 826211e74ce1 |
| 22 | +Successfully tagged myname/jupyter-desktop-server:latest |
| 23 | +$ |
| 24 | +``` |
| 25 | + |
| 26 | +Now you can ran the image: |
| 27 | + |
| 28 | +```bash |
| 29 | +$ docker run --rm -p 8888:8888 $(whoami)/$(basename ${PWD}) |
| 30 | +Executing the command: jupyter notebook |
| 31 | +[I 12:43:59.148 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret |
| 32 | +[I 12:44:00.221 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab |
| 33 | +[I 12:44:00.221 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab |
| 34 | +[I 12:44:00.224 NotebookApp] Serving notebooks from local directory: /home/jovyan |
| 35 | +[I 12:44:00.225 NotebookApp] The Jupyter Notebook is running at: |
| 36 | +[I 12:44:00.225 NotebookApp] http://924904e0a646:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83 |
| 37 | +[I 12:44:00.225 NotebookApp] or http://127.0.0.1:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83 |
| 38 | +[I 12:44:00.225 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). |
| 39 | +[C 12:44:00.229 NotebookApp] |
| 40 | + |
| 41 | + To access the notebook, open this file in a browser: |
| 42 | + file:///home/jovyan/.local/share/jupyter/runtime/nbserver-8-open.html |
| 43 | + Or copy and paste one of these URLs: |
| 44 | + http://924904e0a646:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83 |
| 45 | + or http://127.0.0.1:8888/?token=40475e553b7671b9e93533b97afe584fa2030448505a7d83 |
| 46 | +*snip* |
| 47 | +``` |
| 48 | + |
| 49 | +Now head to the URL shown and you will be greated with a XFCE desktop. |
0 commit comments