Skip to content

Commit

Permalink
EOSC image (#206)
Browse files Browse the repository at this point in the history
* EOSC single user

* Add EOSC image

* Add exception for not linting the CSS
  • Loading branch information
enolfc authored Sep 13, 2024
1 parent 0f4a63c commit d17f966
Show file tree
Hide file tree
Showing 10 changed files with 1,209 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/egi-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
83 changes: 83 additions & 0 deletions single-user-eosc/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit d17f966

Please sign in to comment.