From 4a9ee8ec7f54ba42384911c8fcc478a8392c88d4 Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Fri, 13 Sep 2024 13:56:51 +0100 Subject: [PATCH 1/3] EOSC single user --- single-user-eosc/Dockerfile | 83 +++++ single-user-eosc/eosc/custom.css | 453 ++++++++++++++++++++++++ single-user-eosc/eosc/eosc-ntb-logo.svg | 424 ++++++++++++++++++++++ single-user-eosc/eosc/overrides.json | 111 ++++++ single-user-eosc/tests/R.ipynb | 30 ++ single-user-eosc/tests/julia.ipynb | 28 ++ single-user-eosc/tests/octave.ipynb | 42 +++ single-user-eosc/tests/python.ipynb | 34 ++ 8 files changed, 1205 insertions(+) create mode 100644 single-user-eosc/Dockerfile create mode 100644 single-user-eosc/eosc/custom.css create mode 100644 single-user-eosc/eosc/eosc-ntb-logo.svg create mode 100644 single-user-eosc/eosc/overrides.json create mode 100644 single-user-eosc/tests/R.ipynb create mode 100644 single-user-eosc/tests/julia.ipynb create mode 100644 single-user-eosc/tests/octave.ipynb create mode 100644 single-user-eosc/tests/python.ipynb diff --git a/single-user-eosc/Dockerfile b/single-user-eosc/Dockerfile new file mode 100644 index 00000000..50435ad6 --- /dev/null +++ b/single-user-eosc/Dockerfile @@ -0,0 +1,83 @@ +ARG BASE_IMAGE=eginotebooks/base:latest +# hadolint ignore=DL3006 +FROM $BASE_IMAGE + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN mamba install -y --quiet \ + cftime \ + ipympl \ + jmespath \ + psycopg2 \ + boto3 \ + folium \ + tensorflow \ + tqdm \ + lxml \ + pymongo \ + rasterstats \ + geopandas \ + ipywidgets \ + matplotlib \ + scipy \ + lightgbm \ + plotly \ + graphviz \ + jq \ + nb_conda_kernels \ + # resource usage info in GUI + jupyter-resource-usage \ + && conda clean --all + +# Octave, install on a different environment +# Octave from conda won't build packages +# see https://discourse.jupyter.org/t/installing-octave-packages-with-binder/4206 +USER root + +RUN apt-get update \ + && apt-get install --install-recommends -y \ + octave octave-signal gnuplot\ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +USER $NB_UID + +RUN mamba install -y --quiet octave_kernel=0.32.0 \ + && conda clean --all + +# Rstudio +USER root +RUN apt-get update \ + && apt-get install -y gdebi-core \ + && wget -q https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2022.07.2-576-amd64.deb \ + && gdebi -n rstudio-server-2022.07.2-576-amd64.deb \ + && rm rstudio-server-2022.07.2-576-amd64.deb \ + && apt-get remove -y gdebi \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +USER $NB_UID + +RUN mamba install -y --quiet \ + -c conda-forge jupyter-rsession-proxy \ + && conda clean --all + +# packages not in conda +RUN pip install --no-cache-dir \ + h5glance \ + nbtop \ + panel + +# EOSC customisation +COPY eosc /opt/conda/share/eosc +RUN set -x \ + && export PKG_PATH="$(python -c 'import jupyter_server; print(jupyter_server.__path__[0])')" \ + && mkdir -p "$PKG_PATH/static/custom/logo" \ + && ln -s /opt/conda/share/eosc/custom.css "$PKG_PATH/static/custom/" \ + && ln -s /opt/conda/share/eosc/eosc-ntb-logo.svg "$PKG_PATH/static/custom/logo" \ + && mkdir -p /opt/conda/share/jupyter/lab/settings/ \ + && ln -s /opt/conda/share/eosc/overrides.json /opt/conda/share/jupyter/lab/settings/overrides.json + +RUN jupyter lab build + +RUN rmdir work diff --git a/single-user-eosc/eosc/custom.css b/single-user-eosc/eosc/custom.css new file mode 100644 index 00000000..2da55edb --- /dev/null +++ b/single-user-eosc/eosc/custom.css @@ -0,0 +1,453 @@ +/* + Custom CSS modifying default JupyterLab default UI to include EOSC themes +*/ + +/*----------------------------------------------------------------------------- +| Copyright (c) Jupyter Development Team. +| Distributed under the terms of the Modified BSD License. +|----------------------------------------------------------------------------*/ + +/* +The following CSS variables define the main, public API for styling JupyterLab. +These variables should be used by all plugins wherever possible. In other +words, plugins should not define custom colors, sizes, etc unless absolutely +necessary. This enables users to change the visual theme of JupyterLab +by changing these variables. + +Many variables appear in an ordered sequence (0,1,2,3). These sequences +are designed to work well together, so for example, `--jp-border-color1` should +be used with `--jp-layout-color1`. The numbers have the following meanings: + +* 0: super-primary, reserved for special emphasis +* 1: primary, most important under normal situations +* 2: secondary, next most important under normal situations +* 3: tertiary, next most important under normal situations + +Throughout JupyterLab, we are mostly following principles from Google's +Material Design when selecting colors. We are not, however, following +all of MD as it is not optimized for dense, information rich UIs. +*/ + +:root { + /* Elevation + * + * We style box-shadows using Material Design's idea of elevation. These particular numbers are taken from here: + * + * https://github.com/material-components/material-components-web + * https://material-components-web.appspot.com/elevation.html + */ + + --jp-shadow-base-lightness: 0; + --jp-shadow-umbra-color: rgba( + var(--jp-shadow-base-lightness), + var(--jp-shadow-base-lightness), + var(--jp-shadow-base-lightness), + 0.2 + ); + --jp-shadow-penumbra-color: rgba( + var(--jp-shadow-base-lightness), + var(--jp-shadow-base-lightness), + var(--jp-shadow-base-lightness), + 0.14 + ); + --jp-shadow-ambient-color: rgba( + var(--jp-shadow-base-lightness), + var(--jp-shadow-base-lightness), + var(--jp-shadow-base-lightness), + 0.12 + ); + --jp-elevation-z0: none; + --jp-elevation-z1: 0 2px 1px -1px var(--jp-shadow-umbra-color), + 0 1px 1px 0 var(--jp-shadow-penumbra-color), + 0 1px 3px 0 var(--jp-shadow-ambient-color); + --jp-elevation-z2: 0 3px 1px -2px var(--jp-shadow-umbra-color), + 0 2px 2px 0 var(--jp-shadow-penumbra-color), + 0 1px 5px 0 var(--jp-shadow-ambient-color); + --jp-elevation-z4: 0 2px 4px -1px var(--jp-shadow-umbra-color), + 0 4px 5px 0 var(--jp-shadow-penumbra-color), + 0 1px 10px 0 var(--jp-shadow-ambient-color); + --jp-elevation-z6: 0 3px 5px -1px var(--jp-shadow-umbra-color), + 0 6px 10px 0 var(--jp-shadow-penumbra-color), + 0 1px 18px 0 var(--jp-shadow-ambient-color); + --jp-elevation-z8: 0 5px 5px -3px var(--jp-shadow-umbra-color), + 0 8px 10px 1px var(--jp-shadow-penumbra-color), + 0 3px 14px 2px var(--jp-shadow-ambient-color); + --jp-elevation-z12: 0 7px 8px -4px var(--jp-shadow-umbra-color), + 0 12px 17px 2px var(--jp-shadow-penumbra-color), + 0 5px 22px 4px var(--jp-shadow-ambient-color); + --jp-elevation-z16: 0 8px 10px -5px var(--jp-shadow-umbra-color), + 0 16px 24px 2px var(--jp-shadow-penumbra-color), + 0 6px 30px 5px var(--jp-shadow-ambient-color); + --jp-elevation-z20: 0 10px 13px -6px var(--jp-shadow-umbra-color), + 0 20px 31px 3px var(--jp-shadow-penumbra-color), + 0 8px 38px 7px var(--jp-shadow-ambient-color); + --jp-elevation-z24: 0 11px 15px -7px var(--jp-shadow-umbra-color), + 0 24px 38px 3px var(--jp-shadow-penumbra-color), + 0 9px 46px 8px var(--jp-shadow-ambient-color); + + /* Borders + * + * The following variables, specify the visual styling of borders in JupyterLab. + */ + + --jp-border-width: 1px; + --jp-border-color0: var(--md-grey-400, #bdbdbd); + --jp-border-color1: var(--md-grey-400, #bdbdbd); + --jp-border-color2: var(--md-grey-300, #e0e0e0); + --jp-border-color3: var(--md-grey-200, #eee); + --jp-inverse-border-color: var(--md-grey-600, #757575); + --jp-border-radius: 2px; + + /* UI Fonts + * + * The UI font CSS variables are used for the typography all of the JupyterLab + * user interface elements that are not directly user generated content. + * + * The font sizing here is done assuming that the body font size of --jp-ui-font-size1 + * is applied to a parent element. When children elements, such as headings, are sized + * in em all things will be computed relative to that body size. + */ + + --jp-ui-font-scale-factor: 1.2; + --jp-ui-font-size0: 0.83333em; + --jp-ui-font-size1: 13px; /* Base font size */ + --jp-ui-font-size2: 1.2em; + --jp-ui-font-size3: 1.44em; + --jp-ui-font-family: system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', + helvetica, arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol'; + + /* + * Use these font colors against the corresponding main layout colors. + * In a light theme, these go from dark to light. + */ + + /* Defaults use Material Design specification */ + --jp-ui-font-color0: rgba(0, 0, 0, 1); + --jp-ui-font-color1: rgba(0, 0, 0, 0.87); + --jp-ui-font-color2: rgba(0, 0, 0, 0.54); + --jp-ui-font-color3: rgba(0, 0, 0, 0.38); + + /* + * Use these against the brand/accent/warn/error colors. + * These will typically go from light to darker, in both a dark and light theme. + */ + + --jp-ui-inverse-font-color0: rgba(255, 255, 255, 1); + --jp-ui-inverse-font-color1: rgba(255, 255, 255, 1); + --jp-ui-inverse-font-color2: rgba(255, 255, 255, 0.7); + --jp-ui-inverse-font-color3: rgba(255, 255, 255, 0.5); + + /* Content Fonts + * + * Content font variables are used for typography of user generated content. + * + * The font sizing here is done assuming that the body font size of --jp-content-font-size1 + * is applied to a parent element. When children elements, such as headings, are sized + * in em all things will be computed relative to that body size. + */ + + --jp-content-line-height: 1.6; + --jp-content-font-scale-factor: 1.2; + --jp-content-font-size0: 0.83333em; + --jp-content-font-size1: 14px; /* Base font size */ + --jp-content-font-size2: 1.2em; + --jp-content-font-size3: 1.44em; + --jp-content-font-size4: 1.728em; + --jp-content-font-size5: 2.0736em; + + /* This gives a magnification of about 125% in presentation mode over normal. */ + --jp-content-presentation-font-size1: 17px; + --jp-content-heading-line-height: 1; + --jp-content-heading-margin-top: 1.2em; + --jp-content-heading-margin-bottom: 0.8em; + --jp-content-heading-font-weight: 500; + + /* Defaults use Material Design specification */ + --jp-content-font-color0: rgba(0, 0, 0, 1); + --jp-content-font-color1: rgba(0, 0, 0, 0.87); + --jp-content-font-color2: rgba(0, 0, 0, 0.54); + --jp-content-font-color3: rgba(0, 0, 0, 0.38); + --jp-content-link-color: #004494 !important; + --jp-content-link-visited-color: var(--md-purple-700, #7b1fa2); + --jp-content-font-family: system-ui, -apple-system, blinkmacsystemfont, + 'Segoe UI', helvetica, arial, sans-serif, 'Apple Color Emoji', + 'Segoe UI Emoji', 'Segoe UI Symbol'; + + /* + * Code Fonts + * + * Code font variables are used for typography of code and other monospaces content. + */ + + --jp-code-font-size: 13px; + --jp-code-line-height: 1.3077; /* 17px for 13px base */ + --jp-code-padding: 5px; /* 5px for 13px base, codemirror highlighting needs integer px value */ + --jp-code-font-family-default: menlo, consolas, 'DejaVu Sans Mono', monospace; + --jp-code-font-family: var(--jp-code-font-family-default); + + /* This gives a magnification of about 125% in presentation mode over normal. */ + --jp-code-presentation-font-size: 16px; + + /* may need to tweak cursor width if you change font size */ + --jp-code-cursor-width0: 1.4px; + --jp-code-cursor-width1: 2px; + --jp-code-cursor-width2: 4px; + + /* Layout + * + * The following are the main layout colors use in JupyterLab. In a light + * theme these would go from light to dark. + */ + + --jp-layout-color0: white; + --jp-layout-color1: white; + --jp-layout-color2: var(--md-grey-200, #eee); + --jp-layout-color3: var(--md-grey-400, #bdbdbd); + --jp-layout-color4: var(--md-grey-600, #757575); + + /* Inverse Layout + * + * The following are the inverse layout colors use in JupyterLab. In a light + * theme these would go from dark to light. + */ + + --jp-inverse-layout-color0: #111; + --jp-inverse-layout-color1: var(--md-grey-900, #212121); + --jp-inverse-layout-color2: var(--md-grey-800, #424242); + --jp-inverse-layout-color3: var(--md-grey-700, #616161); + --jp-inverse-layout-color4: var(--md-grey-600, #757575); + + /* Brand/accent */ + + --jp-brand-color0: #004494 !important; + --jp-brand-color1: #004494 !important; + --jp-brand-color2: #004494 !important; + --jp-brand-color3: #004494 !important; + --jp-brand-color4: #004494 !important; + --jp-accent-color0: var(--md-green-900, #1b5e20); + --jp-accent-color1: var(--md-green-700, #388e3c); + --jp-accent-color2: var(--md-green-300, #81c784); + --jp-accent-color3: var(--md-green-100, #c8e6c9); + + /* State colors (warn, error, success, info) */ + + --jp-warn-color0: var(--md-orange-900, #e65100); + --jp-warn-color1: var(--md-orange-700, #f57c00); + --jp-warn-color2: var(--md-orange-300, #ffb74d); + --jp-warn-color3: var(--md-orange-100, #ffe0b2); + --jp-error-color0: var(--md-red-900, #b71c1c); + --jp-error-color1: var(--md-red-700, #d32f2f); + --jp-error-color2: var(--md-red-300, #e57373); + --jp-error-color3: var(--md-red-100, #ffcdd2); + --jp-success-color0: var(--md-green-900, #1b5e20); + --jp-success-color1: var(--md-green-700, #388e3c); + --jp-success-color2: var(--md-green-300, #81c784); + --jp-success-color3: var(--md-green-100, #c8e6c9); + --jp-info-color0: #004494 !important; + --jp-info-color1: #004494 !important; + --jp-info-color2: #004494 !important; + --jp-info-color3: #004494 !important; + + /* Cell specific styles */ + + --jp-cell-padding: 5px; + --jp-cell-collapser-width: 8px; + --jp-cell-collapser-min-height: 20px; + --jp-cell-collapser-not-active-hover-opacity: 0.6; + --jp-cell-editor-background: var(--md-grey-100, #f5f5f5); + --jp-cell-editor-border-color: var(--md-grey-300, #e0e0e0); + --jp-cell-editor-box-shadow: inset 0 0 2px #004494 !important; + --jp-cell-editor-active-background: var(--jp-layout-color0); + --jp-cell-editor-active-border-color: var(--jp-brand-color1); + --jp-cell-prompt-width: 64px; + --jp-cell-prompt-font-family: var(--jp-code-font-family-default); + --jp-cell-prompt-letter-spacing: 0; + --jp-cell-prompt-opacity: 1; + --jp-cell-prompt-not-active-opacity: 0.5; + --jp-cell-prompt-not-active-font-color: var(--md-grey-700, #616161); + + /* A custom blend of MD grey and blue 600 + * See https://meyerweb.com/eric/tools/color-blend/#546E7A:1E88E5:5:hex */ + --jp-cell-inprompt-font-color: #004494 !important; + + /* A custom blend of MD grey and orange 600 + * https://meyerweb.com/eric/tools/color-blend/#546E7A:F4511E:5:hex */ + --jp-cell-outprompt-font-color: #bf5b3d; + + /* Notebook specific styles */ + + --jp-notebook-padding: 10px; + --jp-notebook-select-background: var(--jp-layout-color1); + --jp-notebook-multiselected-color: var(--md-blue-50, #e3f2fd); + + /* The scroll padding is calculated to fill enough space at the bottom of the + notebook to show one single-line cell (with appropriate padding) at the top + when the notebook is scrolled all the way to the bottom. We also subtract one + pixel so that no scrollbar appears if we have just one single-line cell in the + notebook. This padding is to enable a 'scroll past end' feature in a notebook. + */ + --jp-notebook-scroll-padding: calc( + 100% - var(--jp-code-font-size) * var(--jp-code-line-height) - + var(--jp-code-padding) - var(--jp-cell-padding) - 1px + ); + + /* Rendermime styles */ + + --jp-rendermime-error-background: #fdd; + --jp-rendermime-table-row-background: var(--md-grey-100, #cfd8dc); + --jp-rendermime-table-row-hover-background: var(--md-light-blue-50, #e1f5fe); + + /* Dialog specific styles */ + + --jp-dialog-background: rgba(0, 0, 0, 0.25); + + /* Console specific styles */ + + --jp-console-padding: 10px; + + /* Toolbar specific styles */ + + --jp-toolbar-border-color: var(--jp-border-color1); + --jp-toolbar-micro-height: 8px; + --jp-toolbar-background: var(--jp-layout-color1); + --jp-toolbar-box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.24); + --jp-toolbar-header-margin: 4px 4px 0 4px; + --jp-toolbar-active-background: var(--md-grey-300, #90a4ae); + + /* Statusbar specific styles */ + + --jp-statusbar-height: 24px; + + /* Input field styles */ + + --jp-input-box-shadow: inset 0 0 2px #004494 !important; + --jp-input-active-background: var(--jp-layout-color1); + --jp-input-hover-background: var(--jp-layout-color1); + --jp-input-background: var(--md-grey-100, #f5f5f5); + --jp-input-border-color: var(--jp-inverse-border-color); + --jp-input-active-border-color: var(--jp-brand-color1); + --jp-input-active-box-shadow-color: rgba(19, 124, 189, 0.3); + + /* General editor styles */ + + --jp-editor-selected-background: #d9d9d9; + --jp-editor-selected-focused-background: #d7d4f0; + --jp-editor-cursor-color: var(--jp-ui-font-color0); + + /* Code mirror specific styles */ + + --jp-mirror-editor-keyword-color: #008000; + --jp-mirror-editor-atom-color: #88f; + --jp-mirror-editor-number-color: #080; + --jp-mirror-editor-def-color: #004494 !important; + --jp-mirror-editor-variable-color: var(--md-grey-900, #212121); + --jp-mirror-editor-variable-2-color: #004494 !important; + --jp-mirror-editor-variable-3-color: #085; + --jp-mirror-editor-punctuation-color: #004494 !important; + --jp-mirror-editor-property-color: #004494 !important; + --jp-mirror-editor-operator-color: #a2f; + --jp-mirror-editor-comment-color: #408080; + --jp-mirror-editor-string-color: #ba2121; + --jp-mirror-editor-string-2-color: #708; + --jp-mirror-editor-meta-color: #a2f; + --jp-mirror-editor-qualifier-color: #555; + --jp-mirror-editor-builtin-color: #008000; + --jp-mirror-editor-bracket-color: #997; + --jp-mirror-editor-tag-color: #170; + --jp-mirror-editor-attribute-color: #004494 !important; + --jp-mirror-editor-header-color: #004494 !important; + --jp-mirror-editor-quote-color: #090; + --jp-mirror-editor-link-color: #004494 !important; + --jp-mirror-editor-error-color: #f00; + --jp-mirror-editor-hr-color: #999; + + /* + RTC user specific colors. + These colors are used for the cursor, username in the editor, + and the icon of the user. + */ + + --jp-collaborator-color1: #ffad8e; + --jp-collaborator-color2: #dac83d; + --jp-collaborator-color3: #72dd76; + --jp-collaborator-color4: #00e4d0; + --jp-collaborator-color5: #45d4ff; + --jp-collaborator-color6: #e2b1ff; + --jp-collaborator-color7: #ff9de6; + + /* Vega extension styles */ + + --jp-vega-background: white; + + /* Sidebar-related styles */ + + --jp-sidebar-min-width: 250px; + + /* Search-related styles */ + + --jp-search-toggle-off-opacity: 0.5; + --jp-search-toggle-hover-opacity: 0.8; + --jp-search-toggle-on-opacity: 1; + --jp-search-selected-match-background-color: rgb(245, 200, 0); + --jp-search-selected-match-color: black; + --jp-search-unselected-match-background-color: var( + --jp-inverse-layout-color0 + ); + --jp-search-unselected-match-color: var(--jp-ui-inverse-font-color0); + + /* Icon colors that work well with light or dark backgrounds */ + --jp-icon-contrast-color0: var(--md-purple-600, #8e24aa); + --jp-icon-contrast-color1: var(--md-green-600, #43a047); + --jp-icon-contrast-color2: var(--md-pink-600, #d81b60); + --jp-icon-contrast-color3: #004494 !important; + + /* Button colors */ + --jp-accept-color-normal: #004494 !important; + --jp-accept-color-hover: #004494 !important; + --jp-accept-color-active: #004494 !important; + --jp-warn-color-normal: var(--md-red-700, #d32f2f); + --jp-warn-color-hover: var(--md-red-800, #c62828); + --jp-warn-color-active: var(--md-red-900, #b71c1c); + --jp-reject-color-normal: var(--md-grey-600, #757575); + --jp-reject-color-hover: var(--md-grey-700, #616161); + --jp-reject-color-active: var(--md-grey-800, #424242); + + /* File or activity icons and switch semantic variables */ + --jp-jupyter-icon-color: #f37626; + --jp-notebook-icon-color: #f37626; + --jp-json-icon-color: var(--md-orange-700, #f57c00); + --jp-console-icon-background-color: #004494 !important; + --jp-console-icon-color: white; + --jp-terminal-icon-background-color: var(--md-grey-800, #424242); + --jp-terminal-icon-color: var(--md-grey-200, #eee); + --jp-text-editor-icon-color: var(--md-grey-700, #616161); + --jp-inspector-icon-color: var(--md-grey-700, #616161); + --jp-switch-color: var(--md-grey-400, #bdbdbd); + --jp-switch-true-position-color: var(--md-orange-900, #e65100); + + --jp-private-menubar-height: 44px !important; + --jp-private-menu-item-height: 24px !important; + } + + #jp-MainLogo svg { + visibility: hidden !important; + } + + #jp-MainLogo { + background-image: url("./logo/eosc-ntb-logo.svg") !important; + background-repeat: no-repeat !important; + background-size: 99% !important; /* size of the actual image within the allocated space */ + background-position-x: 0px !important; + background-position-y: center !important; + width: 220px !important; /* size of the image space */ + } + + #jp-MainMenu .lm-MenuBar-content { + margin-top: 14px !important; + } + + .lm-MenuBar-item { + margin-top: 9px !important; + line-height: 20px !important; + } diff --git a/single-user-eosc/eosc/eosc-ntb-logo.svg b/single-user-eosc/eosc/eosc-ntb-logo.svg new file mode 100644 index 00000000..4c0e706a --- /dev/null +++ b/single-user-eosc/eosc/eosc-ntb-logo.svg @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/single-user-eosc/eosc/overrides.json b/single-user-eosc/eosc/overrides.json new file mode 100644 index 00000000..199655fa --- /dev/null +++ b/single-user-eosc/eosc/overrides.json @@ -0,0 +1,111 @@ +{ + "@jupyterlab/apputils-extension:notification": { + "checkForUpdates": "false", + "fetchNews": "false" + }, + "@jupyterlab/application-extension:context-menu": { + "contextMenu": [ + { + "command": "filebrowser:share-main", + "selector": ".jp-DirListing-item[data-isdir]", + "disabled": true + } + ] + }, + "@jupyterlab/mainmenu-extension:plugin": { + "menus": [ + { + "disabled": false, + "id": "jp-mainmenu-help", + "items": [ + { + "type": "submenu", + "submenu": { + "id": "jp-mainmenu-help-eosc-links", + "label": "Useful EOSC links", + "items": [ + { + "command": "git:open-url", + "args": { + "text": "EOSC EU website", + "url": "https://open-science-cloud.ec.europa.eu/" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Accessibility statement", + "url": "https://open-science-cloud.ec.europa.eu/accessibility-statement" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Helpdesk contact", + "url": "https://open-science-cloud.ec.europa.eu/support/helpdesk" + } + }, + { + "command": "git:open-url", + "args": { + "text": "FAQ", + "url": "https://open-science-cloud.ec.europa.eu/support/frequently-asked-questions" + } + }, + { + "command": "git:open-url", + "args": { + "text": "EOSC EU Node Acceptable Use Policy", + "url": "https://open-science-cloud.ec.europa.eu/index.php/system/files?file=2024-04/EOSC-EU-Node-Acceptable-Use-Policy.pdf" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Contact the European Commission", + "url": "https://commission.europa.eu/about-european-commission/contact_en" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Follow the European Commission on social media", + "url": "https://european-union.europa.eu/contact-eu/social-media-channels_en#/search?page=0&institutions=european_commission" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Resources for Partners", + "url": "https://commission.europa.eu/resources-partners_en" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Cookies policy", + "url": "https://commission.europa.eu/cookies-policy_en" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Privacy policy", + "url": "https://commission.europa.eu/privacy-policy-websites-managed-european-commission_en" + } + }, + { + "command": "git:open-url", + "args": { + "text": "Legal notice", + "url": "https://commission.europa.eu/legal-notice_en" + } + } + ] + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/single-user-eosc/tests/R.ipynb b/single-user-eosc/tests/R.ipynb new file mode 100644 index 00000000..0f4552a3 --- /dev/null +++ b/single-user-eosc/tests/R.ipynb @@ -0,0 +1,30 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(\"Hello World!\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "R", + "language": "R", + "name": "ir" + }, + "language_info": { + "codemirror_mode": "r", + "file_extension": ".r", + "mimetype": "text/x-r-source", + "name": "R", + "pygments_lexer": "r", + "version": "3.6.3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/single-user-eosc/tests/julia.ipynb b/single-user-eosc/tests/julia.ipynb new file mode 100644 index 00000000..a3645a62 --- /dev/null +++ b/single-user-eosc/tests/julia.ipynb @@ -0,0 +1,28 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "println(\"hello\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Julia 1.10.4", + "language": "julia", + "name": "julia-1.10" + }, + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.10.4" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/single-user-eosc/tests/octave.ipynb b/single-user-eosc/tests/octave.ipynb new file mode 100644 index 00000000..69030c3f --- /dev/null +++ b/single-user-eosc/tests/octave.ipynb @@ -0,0 +1,42 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "disp(\"Hello, World!\");" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Octave", + "language": "octave", + "name": "octave" + }, + "language_info": { + "file_extension": ".m", + "help_links": [ + { + "text": "GNU Octave", + "url": "https://www.gnu.org/software/octave/support.html" + }, + { + "text": "Octave Kernel", + "url": "https://github.com/Calysto/octave_kernel" + }, + { + "text": "MetaKernel Magics", + "url": "https://metakernel.readthedocs.io/en/latest/source/README.html" + } + ], + "mimetype": "text/x-octave", + "name": "octave", + "version": "1" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/single-user-eosc/tests/python.ipynb b/single-user-eosc/tests/python.ipynb new file mode 100644 index 00000000..df022d66 --- /dev/null +++ b/single-user-eosc/tests/python.ipynb @@ -0,0 +1,34 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(\"hello from python\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} From 29deec3b5972bd24607539a09d16684b3a57e0f9 Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Fri, 13 Sep 2024 13:57:25 +0100 Subject: [PATCH 2/3] Add EOSC image --- .github/workflows/egi-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/egi-images.yml b/.github/workflows/egi-images.yml index dd2f91ac..1465bf14 100644 --- a/.github/workflows/egi-images.yml +++ b/.github/workflows/egi-images.yml @@ -15,6 +15,7 @@ jobs: base: base/Dockerfile images: | "single-user/Dockerfile" + "single-user-eosc/Dockerfile" "single-user-panosc/Dockerfile" "single-user-ai4pp/Dockerfile" "single-user-ai/Dockerfile" From 692317d9a27617fbb2352da026f35a24f98bfce5 Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Fri, 13 Sep 2024 14:06:51 +0100 Subject: [PATCH 3/3] Add exception for not linting the CSS --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d1dfab71..49ec33c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,3 +30,6 @@ jobs: VALIDATE_DOCKERFILE_HADOLINT: false # disable this as well VALIDATE_CHECKOV: false + # Not linting the CSS from Jupyter as we don't want to modify this + # (so it's easy to track changes in casse it's needed) + FILTER_REGEX_EXCLUDE: "single-user-eosc/eosc/custom.css"