Dockerfile.dev 3.14 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
4
ARG VILLAS_VERSION=0.8.0

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

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

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

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

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

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

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

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

85
# Install CIMpp from source
Markus Mirz's avatar
Markus Mirz committed
86
RUN cd /tmp && \
87
	git clone --recursive https://github.com/CIM-IEC/libcimpp.git && \
Markus Mirz's avatar
Markus Mirz committed
88
	mkdir -p libcimpp/build && cd libcimpp/build && \
89
	cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=IEC61970_16v29a -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
Markus Mirz's avatar
Markus Mirz committed
90
91
	rm -rf /tmp/libcimpp

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

99
100
101
102
103
104
105
106
107
108
109
110
# 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
ADD requirements-jupyter.txt .
RUN pip3 install -r requirements-jupyter.txt
RUN dnf -y --refresh install npm
RUN jupyter nbextension enable --py widgetsnbextension
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager

111
EXPOSE 8888