Dockerfile 1.87 KB
Newer Older
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
1
FROM jupyter/scipy-notebook
2
#FROM jupyter/minimal-notebook
Marco Leoni's avatar
Marco Leoni committed
3

4
# Install system utilities with apt
Marco Leoni's avatar
Marco Leoni committed
5 6 7 8 9
USER root
RUN apt-get update && \
    apt-get install -y --no-install-recommends openssh-client rsync unison less tree curl gdb imagemagick && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*
10
USER $NB_UID
Marco Leoni's avatar
Marco Leoni committed
11

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

15
# Install the base software stack
16 17 18
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
19 20

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

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