Dockerfile.dev-centos 3.68 KB
Newer Older
1
2
3
FROM centos:8

ARG VILLAS_VERSION=0.8.0
Markus Mirz's avatar
Markus Mirz committed
4
ARG CIM_VERSION=CGMES_2.4.15_16FEB2016
5
6
7
8
9
10
11
12
13
14
15
16
17
18

LABEL \
	org.label-schema.schema-version = "1.0" \
	org.label-schema.name = "DPsim" \
	org.label-schema.license = "GPL-3.0" \
	org.label-schema.vendor = "Institute for Automation of Complex Power Systems, RWTH Aachen University" \
	org.label-schema.author.name = "Steffen Vogel" \
	org.label-schema.author.email = "stvogel@eonerc.rwth-aachen.de" \
	org.label-schema.url = "http://fein-aachen.org/projects/dpsim/" \
	org.label-schema.vcs-url = "https://git.rwth-aachen.de/acs/public/simulation/dpsim"

RUN dnf -y update && \
    dnf install -y epel-release dnf-plugins-core && \
    dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm && \
19
    dnf config-manager --set-enabled powertools && \
20
21
    dnf config-manager --set-enabled remi

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# CUDA dependencies
RUN dnf -y install https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-repo-rhel8-10.2.89-1.x86_64.rpm && \
    dnf --refresh -y install cuda-compiler-10-2 cuda-libraries-dev-10-2 && \
    ln -s cuda-10.2 /usr/local/cuda

ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"

# CUDARPC and dependencies
RUN dnf install -y make bash git gcc autoconf libtool automake \
                   ncurses-devel zlib-devel binutils-devel mesa-libGL-devel \
                   libvdpau-devel mesa-libEGL-devel openssl-devel rpcbind \
                   rpcgen texinfo bison flex

ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH}"
# copy gitlab-runner ssh credentials into build container
38
RUN git clone -b 1.0  --depth 1 --recurse-submodules https://git.rwth-aachen.de/acs/public/virtualization/cricket.git && \
39
40
41
42
43
44
    cd cricket && \
    make -j 16 LOG=INFO

ENV PATH="$PWD/cricket/bin:${PATH}"
ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"

45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Toolchain
RUN dnf -y install \
	git clang gdb ccache \
	redhat-rpm-config \
	rpmdevtools \
	make cmake ninja-build \
	doxygen \
	graphviz \
	pandoc \
	python3-pip \
	pkg-config

# Dependencies
RUN dnf --refresh -y install \
Niklas Eiling's avatar
Niklas Eiling committed
59
	python36-devel \
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
	eigen3-devel \
	libxml2-devel \
	graphviz-devel \
	gsl-devel

# VILLAS dependencies
RUN dnf -y install \
    openssl-devel \
    libuuid-devel \
    libconfig-devel \
    libnl3-devel \
    libcurl-devel \
    jansson-devel \
    mosquitto-devel

75
76
77
78
79
80
81
82
83
84
85
86
87
# Install Libwebsockets from source because the repo variant is not suitable
RUN git clone --branch v4.0-stable --depth 1 https://libwebsockets.org/repo/libwebsockets && \
    mkdir -p libwebsockets/build && \
    pushd libwebsockets/build && \
    cmake -DLWS_WITH_IPV6=ON \
          -DLWS_WITHOUT_TESTAPPS=ON \
          -DLWS_WITHOUT_EXTENSIONS=OFF \
          -DLWS_WITH_SERVER_STATUS=ON \
          ${CMAKE_OPTS} .. && \
    make -j$(nproc) ${TARGET} && \
    popd


Niklas Eiling's avatar
Niklas Eiling committed
88
89
90
91
# Profiling dependencies
RUN dnf -y install \
    graphviz \
    libasan \
92
    cppcheck \
93
94
95
    gnuplot \
	qt5-qtbase \
    qt5-qtsvg
Niklas Eiling's avatar
Niklas Eiling committed
96
97
RUN pip3 install gprof2dot

98
# Install CIMpp from source
99
RUN cd /tmp && \
100
	git clone --recursive https://github.com/cim-iec/libcimpp.git && \
101
	mkdir -p libcimpp/build && cd libcimpp/build && \
102
	cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=${CIM_VERSION} -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
103
104
	rm -rf /tmp/libcimpp

105
106
107
# CIMpp and VILLAS are installed here
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"

108
109
110
111
112
113
114
# Python dependencies
ADD requirements.txt .
RUN pip3 install -r requirements.txt

# Remove this part in the future and use dedicated jupyter Dockerfile
# Activate Jupyter extensions
RUN dnf -y --refresh install npm
115
RUN pip3 install jupyter jupyter_contrib_nbextensions nbconvert nbformat
116
117

EXPOSE 8888