Skip to content

Commit d696093

Browse files
authored
Update binder to use jupyter_server (#18)
* Try to hack using jupyter_server on binder instead of notebook * Oh noes * Add ps to debug * Fix missing -y * Add tutorial notebook * Is the build running relative to the git root? * Add source tree last, fix user access
1 parent 65a2eac commit d696093

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

binder/Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Based on https://mybinder.readthedocs.io/en/latest/examples/sample_repos.html#minimal-dockerfiles-for-binder
2+
FROM python:3.9-slim
3+
4+
ARG NB_USER
5+
ARG NB_UID
6+
ENV USER ${NB_USER}
7+
ENV HOME /home/${NB_USER}
8+
9+
RUN adduser --disabled-password \
10+
--gecos "Default user" \
11+
--uid ${NB_UID} \
12+
${NB_USER}
13+
WORKDIR ${HOME}
14+
15+
# Add project and demo dependencies
16+
RUN apt update \
17+
&& apt install -y -q wamerican procps \
18+
&& pip install --no-cache jupyterlab-quickopen \
19+
&& apt-get clean \
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
# As of 2020-12-31, force binder to use jupyter-server instead of jupyter-notebook
23+
RUN cd $(dirname $(which jupyter-notebook)) \
24+
&& rm jupyter-notebook \
25+
&& ln -s jupyter-server jupyter-notebook
26+
27+
# Add the entire source tree
28+
ADD . .
29+
RUN chown -R $NB_UID .

binder/apt.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

binder/requirements.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)