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

Dockerfile 2.3 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
Marco Leoni's avatar
Marco Leoni committed
8
RUN apt-get update && \
Marco Leoni's avatar
Marco Leoni committed
9
    apt-get install -y --no-install-recommends openssh-client rsync unison less tree curl gdb imagemagick libopenjp2-7 && \
Marco Leoni's avatar
Marco Leoni committed
10 11 12
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

13 14
# Setup default prompt and enable extended file globs
RUN echo 'export PS1=`echo $JUPYTERHUB_USER| sed s/-at-u-psud.fr//`"@jupyterhub \w \$ "\nshopt -s extglob' > /root/.bash_profile
Marco Leoni's avatar
Marco Leoni committed
15

Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
16 17
USER $NB_UID

18
# Install the base software stack
19 20 21
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
22 23

# Install the software stack for each of the following repositories
Marco Leoni's avatar
Marco Leoni committed
24
RUN for REPO in                                                \
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
25
        https://gitlab.u-psud.fr/MethNum/scripts.git           \
Marco Leoni's avatar
Marco Leoni committed
26 27 28 29 30 31 32 33 34 35 36
        https://gitlab.u-psud.fr/Info111/outbound.git          \
        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                        &&         \
37
        (cd repo; test -d binder && cd binder; mamba env update -n base -f environment.yml) &&         \
Marco Leoni's avatar
Marco Leoni committed
38 39 40 41
        rm -rf repo                                 ||         \
        break 0;                                               \
    done

42 43 44 45
# 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
46
#RUN code-server --install-extension ms-python.python
47

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