Dockerfile.dev 3.15 KB
Newer Older
1
FROM fedora:32
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
2

Markus Mirz's avatar
Markus Mirz committed
3
ARG VILLAS_VERSION=0.8.0
Markus Mirz's avatar
Markus Mirz committed
4
5
ARG CIM_VERSION=CGMES_2.4.15_16FEB2016

Markus Mirz's avatar
Markus Mirz committed
6

Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
7
8
9
10
11
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" \
Markus Mirz's avatar
Markus Mirz committed
12
13
	org.label-schema.author.name = "Markus Mirz" \
	org.label-schema.author.email = "mmirz@eonerc.rwth-aachen.de" \
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
14
	org.label-schema.url = "http://fein-aachen.org/projects/dpsim/" \
15
	org.label-schema.vcs-url = "https://git.rwth-aachen.de/acs/public/simulation/dpsim"
16

Georg Martin Reinke's avatar
fix CI    
Georg Martin Reinke committed
17
18
RUN dnf -y update

Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
19
# Toolchain
20
RUN dnf -y install \
21
22
23
24
25
26
27
28
29
30
	gcc gcc-c++ clang \
	git \
	rpmdevtools rpm-build \
	make cmake pkgconfig \
	python3-pip

# Tools needed for developement
RUN dnf -y install \
	doxygen graphviz \
	gdb
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
31
32

# Dependencies
Steffen Vogel's avatar
Steffen Vogel committed
33
RUN dnf --refresh -y install \
34
	python3-devel \
35
	eigen3-devel \
Markus Mirz's avatar
Markus Mirz committed
36
	libxml2-devel \
37
	graphviz-devel \
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
	gsl-devel \
	spdlog-devel \
	fmt-devel

## Build & Install fmtlib
#RUN cd /tmp && \
#	git clone --recursive https://github.com/fmtlib/fmt.git && \
#	mkdir -p fmt/build && cd fmt/build && \
#	git checkout 6.1.2  && \
#	cmake -DBUILD_SHARED_LIBS=ON .. && \
#	make -j$(nproc) install

## Build & Install spdlog
#RUN cd /tmp && \
#	git clone --recursive https://github.com/gabime/spdlog.git && \
#	mkdir -p spdlog/build && cd spdlog/build && \
#	git checkout v1.5.0 && \
#  cmake -DSPDLOG_BUILD_SHARED=ON .. && \
#	make -j$(nproc) install

# Build & Install sundials
RUN cd /tmp && \
	git clone --recursive https://github.com/LLNL/sundials.git && \
	mkdir -p sundials/build && cd sundials/build && \
	git checkout v3.2.1 && \
	cmake -DCMAKE_BUILD_TYPE=Release ..  && \
	make -j$(nproc) install
Georg Martin Reinke's avatar
Georg Martin Reinke committed
65

Steffen Vogel's avatar
Steffen Vogel committed
66
67
68
69
# Install some debuginfos
RUN dnf -y debuginfo-install \
	python3

70
# CIMpp and VILLAS are installed here
71
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
72

73
# minimal VILLAS dependencies
Markus Mirz's avatar
Markus Mirz committed
74
75
76
77
78
RUN dnf -y install \
    openssl-devel \
    libuuid-devel \
    libcurl-devel \
    jansson-devel \
79
80
81
82
83
84
85
    libwebsockets-devel

# optional VILLAS dependencies
RUN dnf -y install \
  mosquitto-devel \
	libconfig-devel \
  libnl3-devel
Markus Mirz's avatar
Markus Mirz committed
86

Markus Mirz's avatar
Markus Mirz committed
87
88
89
90
# Python dependencies
ADD requirements.txt .
RUN pip3 install -r requirements.txt

91
# Install CIMpp from source
Markus Mirz's avatar
Markus Mirz committed
92
RUN cd /tmp && \
Markus Mirz's avatar
Markus Mirz committed
93
	git clone --recursive https://github.com/cim-iec/libcimpp.git && \
Markus Mirz's avatar
Markus Mirz committed
94
	mkdir -p libcimpp/build && cd libcimpp/build && \
Markus Mirz's avatar
Markus Mirz committed
95
	cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=${CIM_VERSION} -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
Markus Mirz's avatar
Markus Mirz committed
96
97
	rm -rf /tmp/libcimpp

98
# Install VILLAS from source
Markus Mirz's avatar
Markus Mirz committed
99
RUN cd /tmp && \
Markus Mirz's avatar
Markus Mirz committed
100
	git -c submodule.fpga.update=none clone --recursive https://git.rwth-aachen.de/acs/public/villas/node.git villasnode && \	
Markus Mirz's avatar
Markus Mirz committed
101
	mkdir -p villasnode/build && cd villasnode/build && \
102
	git checkout 5f6a28ca && git -c submodule.fpga.update=none submodule update --recursive && \
103
	cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make -j$(nproc) install && \
Markus Mirz's avatar
Markus Mirz committed
104
105
	rm -rf /tmp/villasnode

106
107
108
# Remove this part in the future and use dedicated jupyter Dockerfile
# Activate Jupyter extensions
RUN dnf -y --refresh install npm
Markus Mirz's avatar
Markus Mirz committed
109
RUN pip3 install jupyter jupyterlab jupyter_contrib_nbextensions nbconvert nbformat
110

111
EXPOSE 8888