diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1008112ec213c759f321e761ed082e45c5361a88..266e8d70debd6ffc78192619f9cc8ca0db726479 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,21 @@ image: docker:19.03.1 stages: - - build - -variables: - GIT_SUBMODULE_STRATEGY: recursive - DOCKER_TLS_CERTDIR: "/certs" +- build before_script: - - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} +- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} build: stage: build script: - - docker pull ${CI_REGISTRY_IMAGE}:latest || true - - docker build --cache-from ${CI_REGISTRY_IMAGE}:latestci - --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG} - --tag ${CI_REGISTRY_IMAGE}:latest . - - docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG} - - docker push ${CI_REGISTRY_IMAGE}:latest + - docker pull ${CI_REGISTRY_IMAGE}:latest || true + - docker build --cache-from ${CI_REGISTRY_IMAGE}:latestci + --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG} + --tag ${CI_REGISTRY_IMAGE}:latest . + - docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG} + - docker push ${CI_REGISTRY_IMAGE}:latest only: - - master + - master tags: - - docker + - docker diff --git a/Dockerfile b/Dockerfile index 2aa8efb79b65bfe1936c16955bf8e2a55724c723..2111f11ce650eae517cdf3f8e762e570bb0fd26c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,16 @@ -# Specify parent image -ARG BASE_IMAGE=registry.git-ce.rwth-aachen.de/jupyter/singleuser/python:latest +# Specify parent image. Please select a fixed tag here. +ARG BASE_IMAGE=registry.git.rwth-aachen.de/jupyter/profiles/rwth-courses:2020-ss.1 FROM ${BASE_IMAGE} # Install packages via requirements.txt ADD /tmp/requirement.txt . RUN pip3 install -r /tmp/requirements.txt -# Update conda base environment to match specifications in environment.yml +# .. Or update conda base environment to match specifications in environment.yml ADD environment.yml /tmp/environment.yml -USER root RUN sed -i "s|name\: jupyter-example-profile|name\: base|g" /tmp/environment.yml # we need to replace the name of the environment with base such that we can update the base environment here -USER $NB_USER # All packages specified in environment.yml are installed in the base environment RUN conda env update -f /tmp/environment.yml && \ conda clean -a -f -y -ENV JUPYTER_ENABLE_LAB=yes diff --git a/README.md b/README.md index 72c2d3ec32c3cadfd437bb0531a804c574429da5..45ee214bdc28d3abccaeb6c6c91d4c2a47f6a712 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repository contains an exemplary Jupyter profile which works with the RWTH * `Quickstart.ipynb` which is an exemplary Jupyter notebook file. * `environment.yml` which specifies the required Python packages needed to run `Quickstart.ipynb`. This file is used by Anaconda or `conda`. -* `Dockerfile` which defines the linux environment. In the end, the packages in `environment.yml` are installed and a `postBuild.sh` script is executed afterwards. +* `Dockerfile` which defines the linux environment. In the end, the packages in `environment.yml` are installed. * `.gitlab-ci.yml` which specifies the necessary Docker build commands (which are executed every time `Dockerfile` changes in Git). ## Installation diff --git a/environment.yml b/environment.yml index 3f1d687b204d1dc1cda3365362e6be35c5c7dc0a..4ffd541e7618e5c982cf42bb1eda6d7eb3539a01 100644 --- a/environment.yml +++ b/environment.yml @@ -2,9 +2,4 @@ name: jupyter-example-profile channels: - conda-forge dependencies: - - numpy=1.17.3 - - scipy=1.4.1 - - matplotlib=3.1.2 - - jupyterlab=1.2.4 - - nodejs=13.6.0 - - ipympl=0.4.1 # Enables interactive plots + - bokeh==2.0.1 diff --git a/postBuild.sh b/postBuild.sh deleted file mode 100644 index dc32e2cbdbbec4c732eb8560e6384750510e4865..0000000000000000000000000000000000000000 --- a/postBuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -jupyter labextension install @jupyter-widgets/jupyterlab-manager@1.1 jupyter-matplotlib@0.5.0 \ No newline at end of file diff --git a/rwth_colors_matplotlib.py b/rwth_colors_matplotlib.py deleted file mode 100644 index 0dbd4f7a60213102bda7f4c0b3b248d988cae213..0000000000000000000000000000000000000000 --- a/rwth_colors_matplotlib.py +++ /dev/null @@ -1,76 +0,0 @@ -import matplotlib.colors as mcolors - -# RWTH Colors -rwth_colors = { - 'blue': '#00549F', - 'blue-75': '#407FB7', - 'blue-50': '#8EBAE5', - 'blue-25': '#C7DDF2', - 'blue-10': '#E8F1FA', - 'black': '#000000', - 'black-75': '#646567', - 'black-50': '#9C9E9F', - 'black-25': '#CFD1D2', - 'black-10': '#ECEDED', - 'magenta': '#E30066', - 'magenta-75': '#E96088', - 'magenta-50': '#F19EB1', - 'magenta-25': '#F9D2DA', - 'magenta-10': '#FDEEF0', - 'yellow': '#FFED00', - 'yellow-75': '#FFF055', - 'yellow-50': '#FFF59B', - 'yellow-25': '#FFFAD1', - 'yellow-10': '#FFFDEE', - 'petrol': '#006165', - 'petrol-75': '#2D7F83', - 'petrol-50': '#7DA4A7', - 'petrol-25': '#BFD0D1', - 'petrol-10': '#E6ECEC', - 'turquoise': '#0098A1', - 'turquoise-75': '#00B1B7', - 'turquoise-50': '#89CCCF', - 'turquoise-25': '#CAE7E7', - 'turquoise-10': '#EBF6F6', - 'green': '#57AB27', - 'green-75': '#8DC060', - 'green-50': '#B8D698', - 'green-25': '#DDEBCE', - 'green-10': '#F2F7EC', - 'maigrun': '#BDCD00', - 'maigrun-75': '#D0D95C', - 'maigrun-50': '#E0E69A', - 'maigrun-25': '#F0F3D0', - 'maigrun-10': '#F9FAED', - 'orange': '#F6A800', - 'orange-75': '#FABE50', - 'orange-50': '#FDD48F', - 'orange-25': '#FEEAC9', - 'orange-10': '#FFF7EA', - 'red': '#CC071E', - 'red-75': '#D85C41', - 'red-50': '#E69679', - 'red-25': '#F3CDBB', - 'red-10': '#FAEBE3', - 'bordeaux': '#A11035', - 'bordeaux-75': '#B65256', - 'bordeaux-50': '#CD8B87', - 'bordeaux-25': '#E5C5C0', - 'bordeaux-10': '#F5E8E5', - 'violet': '#612158', - 'violet-75': '#834E75', - 'violet-50': '#A8859E', - 'violet-25': '#D2C0CD', - 'violet-10': '#EDE5EA', - 'purple': '#7A6FAC', - 'purple-75': '#9B91C1', - 'purple-50': '#BCB5D7', - 'purple-25': '#DEDAEB', - 'purple-10': '#F2F0F7', -} - -# Append prefix -rwth_colors = {'rwth:' + name: value for name, value in rwth_colors.items()} - -# Propagate rwth_colors to default matplotlib colors -mcolors.get_named_colors_mapping().update(rwth_colors)