Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics to please codefactor.io.
[simgrid.git] / docs / source / tuto_network_calibration / Dockerfile
1 FROM debian:11.1-slim
2
3 RUN printf '%s\n' \
4     "deb    [check-valid-until=no, trusted=yes] http://snapshot.debian.org/archive/debian/20211101T024700Z/ bullseye main contrib non-free" \
5     "deb-src [check-valid-until=no, trusted=yes] http://snapshot.debian.org/archive/debian/20211101T024700Z/ bullseye main contrib non-free" \
6     "deb     [check-valid-until=no, trusted=yes] http://snapshot.debian.org/archive/debian/20211101T024700Z/ bullseye-updates main contrib non-free" \
7     "deb-src [check-valid-until=no, trusted=yes] http://snapshot.debian.org/archive/debian/20211101T024700Z/ bullseye-updates main contrib non-free" > /etc/apt/sources.list \
8 && \
9     apt-get -o Acquire::Check-Valid-Until=false update \
10 && \
11     apt-get install -y --no-install-recommends \
12 # R
13     r-base-core \
14     r-cran-ggplot2 \
15     r-cran-dplyr \
16     r-cran-irkernel \
17     r-cran-quantreg \
18 # simgrid dependencies
19     g++ \
20     gcc \
21     git \
22     valgrind \
23     gfortran \
24     libboost-dev \
25     libboost-all-dev \
26     cmake \
27     dpkg-dev \
28 # misc tools
29     curl \
30 # python
31     python3-dev \
32     python3-pip \
33     python3-setuptools \
34     python3-pandas \
35     python3-matplotlib \
36 # jupyterlab dependencies
37     libffi-dev \
38     pandoc \
39 && \
40     apt-get clean \
41     && rm -rf /var/lib/apt/lists/*
42
43 # pycewise
44 RUN pip install --no-cache-dir --no-dependencies \
45     pycewise==0.1.4 \
46     plotnine==0.8.0 \
47     patsy==0.5.2 \
48     mizani==0.7.3 \
49     palettable==3.3.0 \
50     scipy==1.7.2 \
51     statsmodels==0.13.0 \
52     descartes==1.1.0
53
54 # R package not available at debian's cran
55 RUN R -e "install.packages('remotes', dependencies=TRUE, repos='http://cran.rstudio.com/')" && \
56     R -e "require(remotes); install_version('Ckmeans.1d.dp','4.3.3', dependencies=TRUE, repos='http://cran.rstudio.com/')"
57
58 # python jupyterlab packages
59 RUN pip install --no-cache-dir --upgrade pip && \
60     pip install --no-cache-dir \
61     jupyterlab==3.2.3 \
62     papermill==2.3.3 \
63     ipywidgets==7.6.5
64
65 # simgrid
66 RUN mkdir -p /source && cd /source && git clone --depth=1 https://framagit.org/simgrid/simgrid.git simgrid.git && \
67     cd simgrid.git && \
68     cmake -DCMAKE_INSTALL_PREFIX=/usr/ -Denable_documentation=OFF -Denable_smpi=ON -Denable_compile_optimizations=ON . && \
69     make -j4 install
70
71 # platform-calibration
72 RUN cd /source && git clone --depth=1 https://framagit.org/simgrid/platform-calibration.git && \
73     cd platform-calibration && \
74     git checkout 899f044658246fb86f24e4efc96489df546ad3d3 && \
75     cd src/calibration && \
76     sed -i -e 's/#define NB_RUNS .*/#define NB_RUNS 1/g' calibrate.c && \
77     make CC=smpicc
78
79 # get old calibration data for dahu cluster
80 RUN curl -s -L -o /source/simgrid.git/docs/source/tuto_network_calibration/grenoble_2018-08-29_1808878.zip \
81     https://github.com/Ezibenroc/calibration_analysis/raw/4837a5d841380ab3dfdbfbc919eab485c08890e9/dahu/mpi/grenoble_2018-08-29_1808878.zip
82
83 # tuto_network_calibration compilation
84 RUN cd /source/simgrid.git/docs/source/tuto_network_calibration && \
85     cmake . && \
86     make
87
88 # prepare files for execution
89 RUN cd /source/simgrid.git/docs/source/tuto_network_calibration && \
90     cp grenoble_2018-08-29_1808878.zip /tmp/ && \
91     cd /tmp/ && unzip grenoble_2018-08-29_1808878.zip && \
92     sed -i 1d exp.csv
93
94 WORKDIR /source/simgrid.git/docs/source/tuto_network_calibration/
95 ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root"]