From 9b2d04ec3bbeef6b8f943848cb2518d7630ab4cb Mon Sep 17 00:00:00 2001 From: mrorro Date: Wed, 14 Dec 2022 14:51:45 +0100 Subject: [PATCH] Update AI4PP (#129) * Update ai4pp * Add ai4pp image to workflow * Tensorflow looks for gpu lib in ld_library_path --- .github/workflows/egi-images.yml | 1 + single-user-ai4pp/Dockerfile | 93 ++++++++++++++------------------ 2 files changed, 41 insertions(+), 53 deletions(-) diff --git a/.github/workflows/egi-images.yml b/.github/workflows/egi-images.yml index 890be310..a9b0737b 100644 --- a/.github/workflows/egi-images.yml +++ b/.github/workflows/egi-images.yml @@ -52,6 +52,7 @@ jobs: image: - single-user - single-user-panosc + - single-user-ai4pp steps: - name: try to make free space diff --git a/single-user-ai4pp/Dockerfile b/single-user-ai4pp/Dockerfile index 48d0609f..a0c7b347 100644 --- a/single-user-ai4pp/Dockerfile +++ b/single-user-ai4pp/Dockerfile @@ -5,29 +5,15 @@ 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 \ - eo-learn \ - plotly \ - graphviz \ - jq \ - jupyterlab-git \ - && mamba install pytorch==1.12.1=*cuda* torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch \ - && mamba install -y --quiet fastai mlflow -c fastai \ + nb_conda_kernels \ + cudatoolkit=11.4.2 \ + cudnn \ + matplotlib \ + lightgbm \ + eo-learn \ + plotly \ + graphviz \ + jq \ && conda clean --all # Octave, install on a different environment @@ -44,44 +30,45 @@ RUN apt-get update \ USER $NB_UID RUN mamba install -y --quiet octave_kernel=0.32.0 \ - && SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages().pop())') \ - && jupyter kernelspec install "$SITE_PACKAGES/octave_kernel" --name octave --prefix /opt/conda \ && conda clean --all -#RUN conda config --add channels bioconda \ -# && mamba install -y --quiet \ -# biopython \ -# blast \ -# clustalw \ -# emboss \ -# && conda clean --all - -# packages not in conda -RUN pip install --no-cache-dir \ - git+https://github.com/EGI-Foundation/egi-notebooks-addons@0.1.3 \ - h5glance \ - nbtop \ - tflearn - -# EMSO -# python3.7, install on a different environment -#RUN mamba create --name python3.7 -y --quiet -c conda-forge ipython python=3.7 ipykernel \ -# && $(conda run -n python3.7 /bin/bash -c "which python") -m ipykernel install --prefix /tmp --name Python-3.7 \ -# && jupyter kernelspec install /tmp/share/jupyter/kernels/python-3.7/ --name Python-3.7 --prefix /opt/conda \ -# && rm -rf /tmp/share \ -# && conda clean --all - +# Rstudio USER root - RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - libsndfile1 \ + && 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 -# Avoid a broken extension to show up -RUN jupyter labextension disable @pyviz/jupyterlab_pyviz +RUN mamba install -y --quiet \ + -c conda-forge jupyter-rsession-proxy \ + && conda clean --all + + +# packages not in conda +RUN pip install --no-cache-dir \ + git+https://github.com/EGI-Foundation/egi-notebooks-addons@0.1.3 \ + bokeh==3.0.2 \ + panel \ + jupyterlab-git \ + jupyterlab-github \ + mlflow \ + fastai \ + papermill \ + tensorflow \ + jupyter-tensorboard-proxy \ + mlflow-server-proxy \ + protobuf==4.21.9 \ + torch==1.12.1+cu113 \ + torchvision==0.13.1+cu113 \ + torchaudio==0.12.1 \ + --extra-index-url https://download.pytorch.org/whl/cu113 + +ENV LD_LIBRARY_PATH="${CONDA_DIR}/lib:${LD_LIBRARY_PATH}" RUN rmdir work