Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Commit 9c7403c

Browse files
authored
Merge pull request #19 from kniec/dockerfile-readme
2 parents 2ec34f6 + ebbfd67 commit 9c7403c

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM jupyter/base-notebook:python-3.7.6
2+
3+
4+
USER root
5+
6+
RUN apt-get -y update \
7+
&& apt-get install -y dbus-x11 \
8+
firefox \
9+
xfce4 \
10+
xfce4-panel \
11+
xfce4-session \
12+
xfce4-settings \
13+
xorg \
14+
xubuntu-icon-theme
15+
16+
USER $NB_USER
17+
RUN conda install -c manics websockify \
18+
&& pip install jupyter-desktop-server

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,46 @@
44
Run XFCE (or other desktop environments) on a JupyterHub.
55

66
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

Comments
 (0)