Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • dev_moritz
  • 0.2.0
  • 0.1.0
4 results

Dockerfile

  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Dockerfile 2.83 KiB
    # SPDX-License-Identifier: Apache-2.0
    FROM git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker/ubuntu
    
    LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
    LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
    
    RUN apt-get update && \
        apt-get install -y \
            curl && \
        apt-get clean
    
    ENV JUPYTERHUB_PYTHON_VERSION=3.8
    
    RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
        apt-get update && \
        apt-get install -y \
            nodejs \
            node-gyp \
            libssl1.0-dev \
            openjdk-11-jre-headless && \
        apt-get clean
    
    RUN python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install \
            jupyterlab \
            jupyterhub \
            ipympl \
    	&& \
        python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install \
            @jupyter-widgets/jupyterlab-manager && \
        python${JUPYTERHUB_PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab && \
        python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install \
            jupyter-webrtc \
            ipyvolume \
            jupyter-threejs \
            jupyterlab-execute-time \
        && \
        python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install @ryantam626/jupyterlab_code_formatter && \
        python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab_code_formatter && \
        python${JUPYTERHUB_PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab_code_formatter && \
        python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install black isort && \
        python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab-git && \
        python${JUPYTERHUB_PYTHON_VERSION} -m jupyter lab build
    
    RUN mkdir -p /usr/local/venv && \
        python${JUPYTERHUB_PYTHON_VERSION} -m venv /usr/local/venv/default && \
        . /usr/local/venv/default/bin/activate && \
        python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install --upgrade \
            pip==${PYTHON_PIP_VERSION} \
            setuptools==${PYTHON_SETUPTOOLS_VERSION} && \
        pip --no-cache-dir install tensorflow==1.15.3 && \
        pip --no-cache-dir install \
            wheel \
            black \
            isort \
            pandas \
            scipy \
            pingouin \
            statsmodels \
            matplotlib \
            tables \
            xlrd \
            hsluv \
            ipympl \
            ipywebrtc \
            ipyvolume \
            seaborn \
            JPype1 \
            PySide2 \
            ipykernel \
            tqdm \
            sklearn \
            'mxnet-cu101>=1.6.0,<1.7.0' \
            && \
        ipython kernel install --user --name=default
    
    COPY jupyter_notebook_config.py /etc/jupyter/
    ENV JUPYTER_CONFIG_DIR=/etc/jupyter
    ENV JUPYTERLAB_SETTINGS_DIR=/root/.config/jupyter/lab/user-settings
    ENV JUPYTERLAB_WORKSPACES_DIR=/root/.config/jupyter/lab/workspaces
    
    RUN chmod -x /etc/update-motd.d/*
    RUN mkdir /data
    
    WORKDIR "/data"
    CMD [ "jupyterhub-singleuser" ]