-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.base
More file actions
104 lines (88 loc) · 3.99 KB
/
Dockerfile.base
File metadata and controls
104 lines (88 loc) · 3.99 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM ubuntu:24.04
LABEL org.opencontainers.image.authors="maximilian.horzela@kit.edu"
ENV NCORES=4
USER root
WORKDIR /tmp
RUN echo "wrench ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
SHELL ["/bin/bash", "-c"]
###########################################################
# Install prerequisites
###########################################################
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y \
cmake python3 pip gcc make gfortran libboost-all-dev git \
python3-pip python3-setuptools python3-wheel && \
apt-get -y autoclean && apt-get -y autoremove && \
rm -rf /var/lib/apt-get/lists/*
RUN apt-get install -y \
openssh-client \
python3-numpy python3-matplotlib python3-scipy python3-pandas
# RUN python3 -m pip install --upgrade --no-input --break-system-packages \
# numpy matplotlib scipy pandas
###########################################################
# Compile and install prerequisite software packages
###########################################################
RUN git clone https://github.com/zeux/pugixml.git && \
mkdir -p pugixml/build && pushd pugixml/build && \
git checkout tags/v1.12.1 && \
cmake .. && make -j${NCORES} && make install && popd && \
rm -rf pugixml
RUN git clone https://github.com/nlohmann/json.git && \
mkdir -p json/build && pushd json/build && \
git checkout tags/v3.11.3 && \
cmake .. && make -j${NCORES} && make install && popd && \
rm -rf json
RUN git clone https://github.com/google/googletest.git && \
mkdir -p googletest/build && pushd googletest/build && \
git checkout tags/release-1.12.1 && \
cmake .. && make -j${NCORES} && make install && popd && \
rm -rf googletest
###########################################################
# Compile and install SimGrid(+Modules) & WRENCH
###########################################################
RUN git clone https://framagit.org/simgrid/simgrid.git && \
mkdir -p simgrid/build && pushd simgrid/build && \
git checkout tags/v4.0 && \
cmake .. && make -j${NCORES} && make install && popd && \
rm -rf simgrid
RUN git clone https://github.com/simgrid/file-system-module.git && \
mkdir -p file-system-module/build && pushd file-system-module/build && \
git checkout tags/v0.3 && \
cmake .. && make -j${NCORES} && make install && popd && \
rm -rf file-system-module
RUN git clone https://github.com/wrench-project/wrench.git && \
mkdir -p wrench/build && pushd wrench/build && \
git checkout tags/v2.7 && \
cmake .. && make -j${NCORES} && make install && popd && \
rm -rf wrench
###########################################################
# Compile and install DCSim
###########################################################
RUN git clone https://github.com/HEPCompSim/DCSim.git && \
mkdir -p DCSim/build && pushd DCSim/build && \
git checkout simcal-calibrator && \
cmake .. && make -j${NCORES} && make install && popd && ldconfig && \
mkdir -p /home/DCSim/data && cp -r DCSim/data/* /home/DCSim/data && \
mkdir -p /home/DCSim/tools && cp -r DCSim/tools/* /home/DCSim/tools && \
rm -rf DCSim
RUN ldconfig
###########################################################
# Set user
###########################################################
RUN useradd -ms /bin/bash dcsim
USER dcsim
WORKDIR /home/dcsim
RUN id -a && pwd
ENV PATH=${PATH}:/home/dcsim/.local/bin
###########################################################
# Install simcal calibration framework
###########################################################
RUN git clone https://github.com/HerrHorizontal/Grand-Unified-Calibration-Framework.git && \
pushd Grand-Unified-Calibration-Framework && \
# python3 -m pip install -r requirements.txt && \
python3 -m pip install --break-system-packages . && popd && \
rm -rf Grand-Unified-Calibration-Framework
# set user's environment variable
ENV CXX="g++" CC="gcc"
ENV LD_LIBRARY_PATH=/home/dcsim/.local/lib:/usr/lib:/usr/local/lib64:/usr/local/lib
RUN dc-sim --help