Dockerfile.dev 2.71 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

39
40
41
42
43
44
45
46
# CUDA dependencies
RUN dnf -y install https://developer.download.nvidia.com/compute/cuda/repos/fedora29/x86_64/cuda-repo-fedora29-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}"

Steffen Vogel's avatar
Steffen Vogel committed
47
48
49
50
# Install some debuginfos
RUN dnf -y debuginfo-install \
	python3

51
# CIMpp and VILLAS are installed here
52
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
53

Markus Mirz's avatar
Markus Mirz committed
54
55
56
57
58
59
60
61
62
63
64
# VILLAS dependencies
RUN dnf -y install \
    openssl-devel \
    libuuid-devel \
    libconfig-devel \
    libnl3-devel \
    libcurl-devel \
    jansson-devel \
    libwebsockets-devel \
    mosquitto-devel

65
# Install CIMpp from source
Markus Mirz's avatar
Markus Mirz committed
66
67
68
RUN cd /tmp && \
	git clone --recurse-submodules https://github.com/CIM-IEC/libcimpp.git && \
	mkdir -p libcimpp/build && cd libcimpp/build && \
69
	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
70
71
	rm -rf /tmp/libcimpp

72
# Install VILLAS from source
Markus Mirz's avatar
Markus Mirz committed
73
74
75
76
77
78
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

79
80
81
82
83
84
85
86
87
88
89
90
# 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

91
EXPOSE 8888