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

Update single-user-sobigdata with conda-lock #186

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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/d4science-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
image: ${{ steps.docker_meta.outputs.tags }}
options: -v ${{ github.workspace }}/${{ matrix.image }}:/image-data
run: |
. /opt/conda/etc/profile.d/conda.sh && conda activate sbd
for f in /image-data/tests/*.ipynb; do
if [ -e "$f" ]; then
jupyter nbconvert --ExecutePreprocessor.timeout=600 --to rst \
Expand Down
142 changes: 19 additions & 123 deletions single-user-sobigdata/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,135 +1,31 @@
# _____ ____ _ _____ _
# / ____| | _ \(_) | __ \ | | _ _
# | (___ ___ | |_) |_ __ _| | | | __ _| |_ __ _ _| |_ _| |_
# \___ \ / _ \| _ <| |/ _` | | | |/ _` | __/ _` |_ _|_ _|
# ____) | (_) | |_) | | (_| | |__| | (_| | || (_| | |_| |_|
# |_____/ \___/|____/|_|\__, |_____/ \__,_|\__\__,_|
# __/ |
# |___/

ARG BASE_IMAGE=eginotebooks/d4science-base:latest
# hadolint ignore=DL3006
FROM $BASE_IMAGE
FROM quay.io/jupyter/minimal-notebook:x86_64-2024-02-12

USER root

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
nco \
cdo \
cmake \
g++ \
less \
openssh-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

USER $NB_UID

ARG SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True

RUN mamba install -y --quiet \
basemap \
beakerx \
xgboost \
lightgbm \
catboost \
netcdf4 \
aiohttp \
graph-tool \
scikit-learn \
scikit-mobility \
dask-jobqueue \
fs \
rasterio \
contextily \
nb_conda_kernels \
nb_conda \
&& conda clean -tipy

# Pinned networkx to 2.6.3 as 2.7 makes networksns fail
RUN pip install --no-cache-dir \
bicm \
rdp \
sentinelhub \
import_ipynb \
nbresuse \
ndlib \
motuclient \
panel==0.9.* \
cdlib[C]==0.2.3 \
cython \
node_conformity \
git+https://github.com/geopython/OWSLib.git \
git+https://github.com/guglielmocola/RetweetCascade.git \
fast-forward-indexes \
NEMtropy \
folium==0.11.0 \
geopy==2.0.0 \
hvplot==0.6.0 \
intake==0.6.0 \
intake-esm==2020.8.15 \
hda \
seaborn==0.11.0 \
zarr==2.5.0 \
holoviews \
networkx==2.6.3 \
networksns \
eventclf \
XAI-Library \
convrewriting \
git+https://github.com/guglielmocola/TwitterMonitorLib_v2.git \
pygm \
structify-net

# -------------------------------
# SoBigData ++ specific libraries
# -------------------------------
RUN mamba install -y --quiet \
pyspark \
transformers \
rtree \
geopandas \
nltk \
pydotplus \
plotly \
graphviz \
keras \
selenium \
tweepy \
openjdk=8 \
&& conda clean --all

RUN pip install --no-cache-dir \
torch \
torchvision \
torchaudio \
--index-url https://download.pytorch.org/whl/cpu

RUN pip install --no-cache-dir \
pyfim \
pyclustering \
import_ipynb \
opencv-python \
simpletransformers \
shuffle-graph \
privlib \
ash_model \
cdlib==0.3.0 \
bayanpy \
dynetx==0.3.2 \
geolet \
triplex \
glocalx \
cliqs \
quantum-distance-based-classifier

RUN pip install --no-cache-dir \
-i https://test.pypi.org/pypi/ \
--extra-index-url https://pypi.org/simple \
COPY conda-lock.yml /conda/conda-lock.yml

RUN . /opt/conda/etc/profile.d/conda.sh && \
conda create --name lock -c conda-forge conda-lock --yes && \
conda activate lock && \
conda-lock install --mamba --copy --name sbd /conda/conda-lock.yml && \
conda activate sbd && \
pip install privlib && \
pip install git+https://github.com/guglielmocola/RetweetCascade.git && \
pip install git+https://github.com/guglielmocola/TwitterMonitorLib_v2.git && \
pip install git+https://github.com/vitiugin/cliqs.git && \
pip install -i https://test.pypi.org/pypi/ --extra-index-url https://pypi.org/simple \
anonymization-crisesURV \
antiDiscrimination-crisesURV
antiDiscrimination-crisesURV && \
conda clean --all --force-pkgs-dirs --yes && \
pip cache purge

# -------------------------------
# JupyterLab extensions
# -------------------------------
RUN pip install --no-cache-dir jupyterlab-topbar
RUN jupyter labextension disable @jupyterlab/filebrowser-extension:share-file
WORKDIR "${HOME}"
21 changes: 21 additions & 0 deletions single-user-sobigdata/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# How to

## Create a conda-lock file

Steps:

```shell
conda create -n conda-lock -c conda-forge conda-lock --yes
conda activate conda-lock
conda-lock --file=sbd-extended.yml --platform=linux-64
```

## Install conda-lock file

Steps:

```shell
conda create -n conda-lock -c conda-forge conda-lock --yes
conda activate conda-lock
conda-lock install --name sbd conda-lock.yml
```
Loading
Loading