Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOSC image #206

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading