Dockerfile.dev 2.33 KB
Newer Older
Steffen Vogel's avatar
Steffen Vogel committed
1
FROM fedora:29
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
	git clang gdb ccache \
Steffen Vogel's avatar
Steffen Vogel committed
20
	redhat-rpm-config \
21
	rpmdevtools \
22
	make cmake ninja-build \
Steffen Vogel's avatar
Steffen Vogel committed
23
	doxygen \
Steffen Vogel's avatar
Steffen Vogel committed
24
	graphviz \
Steffen Vogel's avatar
Steffen Vogel committed
25
	pandoc \
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
26
27
	python3-pip \
	pkg-config
Steffen Vogel's avatar
fix CI    
Steffen Vogel committed
28
29

# Dependencies
Steffen Vogel's avatar
Steffen Vogel committed
30
RUN dnf --refresh -y install \
31
	python3-devel \
32
	eigen3-devel \
Markus Mirz's avatar
Markus Mirz committed
33
	libxml2-devel \
Steffen Vogel's avatar
Steffen Vogel committed
34
	spdlog-devel \
35
	graphviz-devel \
36
	sundials-devel \
Jan Dinkelbach's avatar
Jan Dinkelbach committed
37
	gsl-devel
Georg Martin Reinke's avatar
Georg Martin Reinke committed
38

Steffen Vogel's avatar
Steffen Vogel committed
39
40
41
42
# Install some debuginfos
RUN dnf -y debuginfo-install \
	python3

43
# CIMpp and VILLAS are installed here
44
ENV LD_LIBRARY_PATH /usr/local/lib64
45

Markus Mirz's avatar
Markus Mirz committed
46
47
48
49
50
51
52
53
54
55
56
# VILLAS dependencies
RUN dnf -y install \
    openssl-devel \
    libuuid-devel \
    libconfig-devel \
    libnl3-devel \
    libcurl-devel \
    jansson-devel \
    libwebsockets-devel \
    mosquitto-devel

57
# Install CIMpp from source
Markus Mirz's avatar
Markus Mirz committed
58
59
60
RUN cd /tmp && \
	git clone --recurse-submodules https://github.com/CIM-IEC/libcimpp.git && \
	mkdir -p libcimpp/build && cd libcimpp/build && \
61
	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
62
63
	rm -rf /tmp/libcimpp

64
# Install VILLAS from source
Markus Mirz's avatar
Markus Mirz committed
65
66
67
68
69
70
RUN cd /tmp && \
	git clone --recurse-submodules https://git.rwth-aachen.de/acs/public/villas/node.git villasnode && \
	mkdir -p villasnode/build && cd villasnode/build && \
	cmake -DWITH_NODE_ETHERCAT=OFF -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 .. && make -j$(nproc) install && \
	rm -rf /tmp/villasnode

71
72
73
74
75
76
77
78
79
80
81
82
# 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

83
EXPOSE 8888