-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile_simgrid_v3_20
52 lines (36 loc) · 2.75 KB
/
Dockerfile_simgrid_v3_20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#FROM ubuntu:jammy
FROM debian:12
MAINTAINER Henri Casanova <[email protected]>
RUN apt-get update
# install languages
RUN apt-get -y install g++ vim
# build environment
RUN apt-get -y install wget
RUN apt-get -y install cmake
RUN apt-get -y install sudo
# experimental environment
RUN apt-get install -y time
#install python3
RUN apt-get install -y python3
# install boost
RUN wget --no-check-certificate https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz && tar -xzf boost_1_55_0.tar.gz && cd boost_1_55_0 && ./bootstrap.sh && ./b2 ; ./b2 install ; cd .. && /bin/rm -rf boost_1_55_0
#RUN apt-get -y install libboost-all-dev
RUN apt-get -y install perl-modules
# install doxygen
RUN apt-get -y install doxygen
# install SimGrid
RUN wget --no-check-certificate https://framagit.org/simgrid/simgrid/-/archive/v3.20/simgrid-v3.20.tar.gz && tar -xf simgrid-v3.20.tar.gz && cd simgrid-v3.20
RUN cd simgrid-v3.20 && head -116 ./src/kernel/context/Context.hpp > /tmp/Context.hpp && echo "#undef SIGSTKSZ" >> /tmp/Context.hpp && echo "#define SIGSTKSZ 20480" >> /tmp/Context.hpp && tail -30 ./src/kernel/context/Context.hpp >> /tmp/Context.hpp && /bin/mv /tmp/Context.hpp ./src/kernel/context/Context.hpp
RUN cd simgrid-v3.20 && echo "#include <stdexcept>" > /tmp/sd_daxloader.cpp && cat src/simdag/sd_daxloader.cpp >> /tmp/sd_daxloader.cpp && mv /tmp/sd_daxloader.cpp src/simdag/sd_daxloader.cpp && echo "#include <string>" > /tmp/smpi_f2c.hpp && cat src/smpi/include/smpi_f2c.hpp >> /tmp/smpi_f2c.hpp && mv /tmp/smpi_f2c.hpp src/smpi/include/smpi_f2c.hpp
RUN cd simgrid-v3.20 && echo "#define SIGSTKSZ 20480" > /tmp/ContextThread.cpp && echo "char sigsegv_stack2[SIGSTKSZ];" >> /tmp/ContextThread.cpp && cat src/kernel/context/ContextThread.cpp | sed "s/sigsegv_stack/sigsegv_stack2/" >> /tmp/ContextThread.cpp && mv /tmp/ContextThread.cpp src/kernel/context/ContextThread.cpp
RUN cd simgrid-v3.20 && head -54 ./include/xbt/functional.hpp > /tmp/functional.hpp && tail -258 ./include/xbt/functional.hpp >> /tmp/functional.hpp && mv /tmp/functional.hpp ./include/xbt/functional.hpp
RUN cd simgrid-v3.20 && head -59 ./include/xbt/functional.hpp > /tmp/functional.hpp && tail -246 ./include/xbt/functional.hpp >> /tmp/functional.hpp && mv /tmp/functional.hpp ./include/xbt/functional.hpp
RUN cd simgrid-v3.20 && head -261 ./include/xbt/future.hpp > /tmp/future.hpp && tail -4 ./include/xbt/future.hpp >> /tmp/future.hpp && mv /tmp/future.hpp ./include/xbt/future.hpp
RUN cd simgrid-v3.20 && mkdir build && cd build && cmake -Denable_smpi=off .. && make -j12 && sudo make install
# Add user
RUN apt-get install -y sudo
RUN useradd -ms /bin/bash simgrid
RUN adduser simgrid sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER simgrid
WORKDIR /home/simgrid