diff --git a/Dockerfile b/Dockerfile index 4b40d29b0eedaa0f28ba57c3ed65a7c56ad57ff1..ca619abf1b99cf796ce51dc0846d85afa2835f55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,21 @@ +# Specify parent image ARG BASE_IMAGE=registry.git.rwth-aachen.de/acs/cloud/jupyter/singleuser/python:latest FROM ${BASE_IMAGE} -# update conda base environment to match specifications in environment.yml +# Update conda base environment to match specifications in environment.yml ADD environment.yml /tmp/environment.yml USER root RUN sed -i "s|name\: jupyter-quickstart|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 -RUN cat /tmp/environment.yml -RUN conda env update -f /tmp/environment.yml +RUN conda env update -f /tmp/environment.yml # All packages specified in environment.yml are installed in the base environment -# cleanup conda packages +# Cleanup conda packages RUN conda clean --all -f -y -# install some extensions defined in binder postBuild +# Execute postBuild script ADD binder/postBuild /tmp/postBuild.sh USER root -RUN chmod +x /tmp/postBuild.sh +RUN chmod +x /tmp/postBuild.sh # Make the file executable (TODO: is this still needed?) USER $NB_USER RUN /tmp/postBuild.sh diff --git a/README.md b/README.md index 6a749fc56bc3b1d2b09588d4be514c77b32cb8f9..19c5e389004f426cc725e977d018561a75d29200 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,23 @@ -<img align="right" src="https://git.rwth-aachen.de/IENT/jupyter-quickstart/raw/master/figures/rwth_ient_logo@2x.png" alt="Logo Institut für Nachrichtentechnik | RWTH Aachen University" width="240px"> - # Jupyter Quickstart ## Introduction -This repository contains of some getting-started Jupyter notebooks. +This repository contains an exemplary Jupyter profile which works with the RWTH Jupyter server. To be more specific, it includes the following files + +* `Quickstart.ipynb` which is an exemplary Jupyter notebook file. +* `environment.yml` which specifies the required Python packages needed to run `Quickstart.ipynb`. +* `Dockerfile` which defines the linux environment. In the end, the packages in `environment.yml` are installed and a `postBuild` script is executed afterwards. +* `.gitlab-ci.yml` which specifies the necessary Docker build commands (which are executed every time `Dockerfile` changes in Git). + +Run the notebook directly online [](https://mybinder.org/v2/git/https%3A%2F%2Fgit.rwth-aachen.de%2FIENT%2Fjupyter-quickstart/master?urlpath=lab/tree/index.ipynb) (the starting process of the session may take up to one minute). -Run the notebooks directly online [](https://mybinder.org/v2/git/https%3A%2F%2Fgit.rwth-aachen.de%2FIENT%2Fjupyter-quickstart/master?urlpath=lab/tree/index.ipynb) (the starting process of the session may take up to one minute). +## Installation -## Installation on RWTH Jupyter Server +### Installation on RWTH Jupyter Server TBD -## Docker +### Docker For advanced users only: If you happen to have Docker installed, you can start a local dockerized JupyterLab with enabled GDET3-Demos with @@ -22,7 +27,7 @@ docker run --name='jupyter-quickstart' --rm -it -p 8888:8888 -e JUPYTER_ENABLE_L Copy and paste the displayed link to your favorite browser. -## Local Installation +### Local Installation To run the notebooks on your local machine, you may use [Anaconda](https://www.anaconda.com/) (using `pip` is also possible for experienced users. You have to install all the requirements listed in `environment.yml` and install the commands listed in `binder/postBuild`). @@ -55,7 +60,7 @@ To run the notebooks on your local machine, you may use [Anaconda](https://www.a If the latter command fails, please open `postBuild` and execute the commands listed there manually. -## Local Run +### Local Run * Activate the environment with `conda activate jupyter-quickstart`. * Run JupyterLab `jupyter lab`. In your browser, JupyterLab should start. You can then open `index.ipynb` for an overview over all notebooks. diff --git a/environment.yml b/environment.yml index d9a5e0f74ad9b93bf87dd6a8e27b474f79623924..46c093d664b633e0e224a8702ce0c68686744a8c 100644 --- a/environment.yml +++ b/environment.yml @@ -7,4 +7,4 @@ dependencies: - matplotlib=3.1.1 - jupyterlab=1.0.9 - nodejs=12.8.1 - - ipympl=0.3.3 + - ipympl=0.3.3 # Enables interactive plots