Dockerfile.dev 3.04 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
ARG CIM_VERSION=IEC61970_16v29a
Markus Mirz's avatar
Markus Mirz committed
5

Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
6
7
8
9
10
11
12
13
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/" \
14
	org.label-schema.vcs-url = "https://git.rwth-aachen.de/acs/public/simulation/dpsim"
15

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

Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
18
# Toolchain
19
RUN dnf -y install \
20
21
22
23
24
25
26
27
28
29
	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
30
31

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

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

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

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

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

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

90
# Install CIMpp from source
Markus Mirz's avatar
Markus Mirz committed
91
RUN cd /tmp && \
Markus Mirz's avatar
Markus Mirz committed
92
	git clone --recursive https://github.com/cim-iec/libcimpp.git && \
Markus Mirz's avatar
Markus Mirz committed
93
	mkdir -p libcimpp/build && cd libcimpp/build && \
Markus Mirz's avatar
Markus Mirz committed
94
	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
95
96
	rm -rf /tmp/libcimpp

97
# Install VILLAS from source
Markus Mirz's avatar
Markus Mirz committed
98
RUN cd /tmp && \
99
	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
100
	mkdir -p villasnode/build && cd villasnode/build && \
101
	cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make -j$(nproc) install && \
Markus Mirz's avatar
Markus Mirz committed
102
103
	rm -rf /tmp/villasnode

104
105
106
# 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
107
RUN pip3 install jupyter jupyter_contrib_nbextensions nbconvert nbformat
108

109
EXPOSE 8888