Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Dockerfile 2.64 KB
Newer Older
Marco Leoni's avatar
Marco Leoni committed
1 2
FROM jupyter/tensorflow-notebook
# FROM jupyter/scipy-notebook # just commented out
3
#FROM jupyter/minimal-notebook
Marco Leoni's avatar
Marco Leoni committed
4 5

USER root
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
6 7

# Install system utilities with apt
Nicolas Thiéry's avatar
Nicolas Thiéry committed
8
# Also install ocaml and dependency rlwrap for L2 CS course by Kim Nguyen
Marco Leoni's avatar
Marco Leoni committed
9
RUN apt-get update && \
Nicolas Thiéry's avatar
Nicolas Thiéry committed
10
    apt-get install -y --no-install-recommends openssh-client rsync unison less tree curl gdb imagemagick libopenjp2-7 ocaml rlwrap && \
Marco Leoni's avatar
Marco Leoni committed
11 12 13
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

14 15
# Setup default prompt
RUN echo 'export PS1=`echo $JUPYTERHUB_USER| sed s/-at-.*//`"@jupyterhub:\w\$ "' > /etc/profile.d/02-prompt.sh
16 17
# Hack to override the setting of PS1 in the users's bashrc
RUN ln -s /etc/profile.d/02-prompt.sh /etc/bash_completion
18 19
# Enable extended file globs in bash
RUN echo 'shopt -s extglob' > /etc/profile.d/03-extglob.sh
Marco Leoni's avatar
Marco Leoni committed
20

Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
21 22
USER $NB_UID

23
# Install the base software stack
24 25 26
RUN conda update  -n base -c conda-forge --update-all
COPY environment.yml .
RUN conda env update -n base -f environment.yml && rm environment.yml
27 28

# Install the software stack for each of the following repositories
Marco Leoni's avatar
Marco Leoni committed
29
RUN for REPO in                                                \
30
        https://gitlab.u-psud.fr/MethNum/scripts.git           \
31
        https://gitlab.u-psud.fr/Info111/ComputerLab.git       \
Marco Leoni's avatar
Marco Leoni committed
32 33 34 35 36 37 38 39 40 41
        https://gitlab.u-psud.fr/Info122/Info122.git           \
        https://github.com/madclam/info113/                    \
        https://github.com/nthiery/M1-ISD-AlgorithmiqueAvancee \
        https://gitlab.u-psud.fr/nicolas.thiery/ter-jupyter    \
        ; do                                                   \
        echo =================================================;\
        echo Installing software stack for:                   ;\
        echo   $REPO                                          ;\
        echo =================================================;\
        git clone $REPO repo                        &&         \
42
        (cd repo; test -d binder && cd binder; mamba env update -n base -f environment.yml) &&         \
Marco Leoni's avatar
Marco Leoni committed
43 44 45 46
        rm -rf repo                                 ||         \
        break 0;                                               \
    done

47
# Install SageMath, for now in a different environment
48
RUN mamba create --yes -n sage sage=9.1
49

50 51 52 53
# Enable the Visual Studio proxy extension in notebook and lab
# Taken from https://github.com/betatim/vscode-binder/blob/master/postBuild
RUN jupyter serverextension enable --py jupyter_server_proxy
RUN jupyter labextension install @jupyterlab/server-proxy
54
#RUN code-server --install-extension ms-python.python
55

56
# Install unpackaged jupyterlab extensions and force jupyterlab rebuild
57
RUN jupyter labextension install @wallneradam/run_all_buttons