diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5d97c52c6873a2236a01d9d5d882fe48dcda195..f9c46a2e2e5081e5a5151dd761d83ccc027ae8f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,8 @@ build ubuntu: script: - image_name="${CI_REGISTRY}/${CI_PROJECT_PATH,,}" - podman build --cgroup-manager=cgroupfs --pull -t "${image_name}/ubuntu" ubuntu - - podman build --cgroup-manager=cgroupfs -t "${image_name}/jupyterhub" jupyterhub + - podman build --cgroup-manager=cgroupfs -t "${image_name}/jupyterhub" jupyterhub/base + - podman build --cgroup-manager=cgroupfs -t "${image_name}/jupyterhub_vim" jupyterhub/vim deploy ubuntu: stage: deploy @@ -25,5 +26,9 @@ deploy ubuntu: - podman push "${image_name}/jupyterhub:$calver" - podman image rm "${image_name}/jupyterhub:$calver" - docker pull "${image_name}/jupyterhub:$calver" + - podman tag "${image_name}/jupyterhub_vim" "${image_name}/jupyterhub_vim:$calver" + - podman push "${image_name}/jupyterhub_vim:$calver" + - podman image rm "${image_name}/jupyterhub_vim:$calver" + - docker pull "${image_name}/jupyterhub_vim:$calver" after_script: - podman logout "${CI_REGISTRY}" diff --git a/jupyterhub/Dockerfile b/jupyterhub/base/Dockerfile similarity index 61% rename from jupyterhub/Dockerfile rename to jupyterhub/base/Dockerfile index 4986bdbe9502511382eefa0dee9e6908cdb8ef02..c78ff3758053220dc1ecf6bf4635bf3a7016bd8d 100755 --- a/jupyterhub/Dockerfile +++ b/jupyterhub/base/Dockerfile @@ -9,7 +9,7 @@ RUN apt-get update && \ curl && \ apt-get clean -ARG PYTHON_VERSION=3.8 +ENV JUPYTERHUB_PYTHON_VERSION=3.8 RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ apt-get update && \ @@ -20,31 +20,31 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ openjdk-11-jre-headless && \ apt-get clean -RUN python${PYTHON_VERSION} -m pip --no-cache-dir install \ +RUN python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install \ jupyterlab \ jupyterhub \ ipympl \ && \ - python${PYTHON_VERSION} -m jupyter labextension install \ + python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install \ @jupyter-widgets/jupyterlab-manager && \ - python${PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab && \ - python${PYTHON_VERSION} -m jupyter labextension install \ + 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${PYTHON_VERSION} -m jupyter labextension install @ryantam626/jupyterlab_code_formatter && \ - python${PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab_code_formatter && \ - python${PYTHON_VERSION} -m jupyter serverextension enable --sys-prefix --py jupyterlab_code_formatter && \ - python${PYTHON_VERSION} -m pip --no-cache-dir install black isort && \ - python${PYTHON_VERSION} -m pip --no-cache-dir install jupyterlab-git && \ - python${PYTHON_VERSION} -m jupyter lab build + 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 ~/.venv && \ - python${PYTHON_VERSION} -m venv ~/.venv/robofish && \ + python${JUPYTERHUB_PYTHON_VERSION} -m venv ~/.venv/robofish && \ . ~/.venv/robofish/bin/activate && \ - python${PYTHON_VERSION} -m pip --no-cache-dir install --upgrade pip==20.2.2 && \ + python${JUPYTERHUB_PYTHON_VERSION} -m pip --no-cache-dir install --upgrade pip==20.2.2 && \ pip --no-cache-dir install --upgrade setuptools==49.1.0 && \ pip install tensorflow==1.15.3 && \ pip --no-cache-dir install \ diff --git a/jupyterhub/commands.jupyterlab-settings b/jupyterhub/base/commands.jupyterlab-settings similarity index 100% rename from jupyterhub/commands.jupyterlab-settings rename to jupyterhub/base/commands.jupyterlab-settings diff --git a/jupyterhub/jupyter_notebook_config.py b/jupyterhub/base/jupyter_notebook_config.py similarity index 100% rename from jupyterhub/jupyter_notebook_config.py rename to jupyterhub/base/jupyter_notebook_config.py diff --git a/jupyterhub/themes.jupyterlab-settings b/jupyterhub/base/themes.jupyterlab-settings similarity index 100% rename from jupyterhub/themes.jupyterlab-settings rename to jupyterhub/base/themes.jupyterlab-settings diff --git a/jupyterhub/vim/Dockerfile b/jupyterhub/vim/Dockerfile new file mode 100755 index 0000000000000000000000000000000000000000..b825dd9e90fa55312f8ba0b42f135c876d5abd06 --- /dev/null +++ b/jupyterhub/vim/Dockerfile @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 +FROM git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker/jupyterhub + +LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>" +LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>" + +RUN python${JUPYTERHUB_PYTHON_VERSION} -m jupyter labextension install @axlair/jupyterlab_vim