Skip to content

Commit

Permalink
Cleanup Dockerfiles
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Vogel <[email protected]>
  • Loading branch information
stv0g committed Mar 6, 2024
1 parent d9ce390 commit 35fa11c
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 42 deletions.
16 changes: 8 additions & 8 deletions packaging/Docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ LABEL \
org.opencontainers.image.url="http://dpsim.fein-aachen.org/" \
org.opencontainers.image.source="https://github.com/sogno-platform/dpsim"

RUN dnf -y update
RUN dnf --assumeyes --refresh update

# Toolchain
RUN dnf -y install \
RUN dnf --assumeyes install \
gcc gcc-c++ clang \
git \
rpmdevtools rpm-build \
Expand All @@ -24,13 +24,13 @@ RUN dnf -y install \
cppcheck

# Tools needed for developement
RUN dnf -y install \
RUN dnf --assumeyes install \
doxygen graphviz \
gdb \
procps-ng

# Dependencies
RUN dnf --refresh -y install \
RUN dnf --assumeyes install \
python3-devel \
eigen3-devel \
libxml2-devel \
Expand All @@ -39,7 +39,7 @@ RUN dnf --refresh -y install \
fmt-devel

# Install some debuginfos
RUN dnf -y debuginfo-install \
RUN dnf --assumeyes debuginfo-install \
python3

# Build & Install sundials
Expand All @@ -54,15 +54,15 @@ RUN cd /tmp && \
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"

# Install minimal VILLASnode dependencies
RUN dnf -y install \
RUN dnf --assumeyes install \
openssl-devel \
libuuid-devel \
libcurl-devel \
jansson-devel \
libwebsockets-devel

# Install optional VILLASnode dependencies
RUN dnf -y install \
RUN dnf --assumeyes install \
mosquitto-devel \
libconfig-devel \
libnl3-devel
Expand Down Expand Up @@ -97,7 +97,7 @@ RUN cd /tmp && \

# Remove this part in the future and use dedicated Jupyter Dockerfile
# Activate Jupyter extensions
RUN dnf -y --refresh install \
RUN dnf --assumeyes install \
npm

RUN pip3 install \
Expand Down
14 changes: 7 additions & 7 deletions packaging/Docker/Dockerfile.dev-debian
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ LABEL \
org.opencontainers.image.url = "http://dpsim.fein-aachen.org/" \
org.opencontainers.image.source = "https://github.com/sogno-platform/dpsim"

RUN apt-get -y update
RUN apt-get --assume-yes update

# Toolchain
RUN apt-get -y install \
RUN apt-get --assume-yes install \
gcc g++ clang \
git \
make cmake pkg-config \
python3-pip \
wget

# Tools needed for developement
RUN apt-get -y install \
RUN apt-get --assume-yes install \
doxygen graphviz \
gdb

# Dependencies
RUN apt-get -y install \
RUN apt-get --assume-yes install \
python3-dev \
libeigen3-dev \
libxml2-dev \
Expand All @@ -48,15 +48,15 @@ RUN cd /tmp && \
make ${MAKE_OPTS} install

## Install minimal VILLASnode dependencies
RUN apt-get -y install \
RUN apt-get --assume-yes install \
libssl-dev \
uuid-dev \
libcurl4-gnutls-dev \
libjansson-dev \
libwebsockets-dev

## Install optional VILLASnode dependencies
RUN apt-get -y install \
RUN apt-get --assume-yes install \
libmosquitto-dev \
libconfig-dev \
libnl-3-dev
Expand Down Expand Up @@ -101,7 +101,7 @@ RUN cd /tmp && \

# Remove this part in the future and use dedicated Jupyter Dockerfile
# Activate Jupyter extensions
RUN apt-get -y install \
RUN apt-get --assume-yes install \
npm

RUN pip3 install \
Expand Down
18 changes: 14 additions & 4 deletions packaging/Docker/Dockerfile.dev-docs
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
FROM ubuntu:latest

RUN apt update
RUN apt install -y git golang curl sudo
RUN curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - && \
sudo apt-get install -y nodejs
RUN apt-get --assume-yes update
RUN apt-get --assume-yes install \
git \
golang \
curl \
sudo

RUN curl -fsSL https://deb.nodesource.com/setup_19.x | \
sudo -E bash - && \
sudo apt-get --assume-yes install \
nodejs

RUN go install -tags extended github.com/gohugoio/hugo@latest

RUN cp /root/go/bin/hugo /usr/bin/hugo

EXPOSE 1313/tcp

WORKDIR /dpsim/docs/hugo
6 changes: 3 additions & 3 deletions packaging/Docker/Dockerfile.dev-minimal
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ LABEL \
org.opencontainers.image.url = "http://dpsim.fein-aachen.org/" \
org.opencontainers.image.source = "https://github.com/sogno-platform/dpsim"

RUN dnf -y update
RUN dnf --assumeyes --refresh update

# Toolchain
RUN dnf -y install \
RUN dnf --assumeyes install \
gcc gcc-c++ \
git \
make cmake pkgconfig \
python3-pip

# Dependencies
RUN dnf --refresh -y install \
RUN dnf --assumeyes install \
python3-devel \
eigen3-devel \
spdlog-devel
Expand Down
23 changes: 11 additions & 12 deletions packaging/Docker/Dockerfile.dev-rocky
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ LABEL \
org.opencontainers.image.url="http://dpsim.fein-aachen.org/" \
org.opencontainers.image.source="https://github.com/sogno-platform/dpsim"

RUN dnf -y update && \
dnf install -y epel-release dnf-plugins-core && \
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm && \
RUN dnf --assumeyes --refresh update
RUN dnf --assumeyes install epel-release dnf-plugins-core && \
dnf --assumeyes install https://rpms.remirepo.net/enterprise/remi-release-9.rpm && \
dnf config-manager --set-enabled crb && \
dnf config-manager --set-enabled remi

# CUDA dependencies
RUN dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo && \
dnf --refresh -y install cuda-compiler-11-7 cuda-libraries-devel-11-7 cuda-nvprof-11-7 && \
dnf --assumeyes --refresh install cuda-compiler-11-7 cuda-libraries-devel-11-7 cuda-nvprof-11-7 && \
ln -s cuda-11.7 /usr/local/cuda

ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"

# Toolchain
RUN dnf -y install \
RUN dnf --assumeyes install \
git clang gdb ccache \
redhat-rpm-config \
rpmdevtools \
Expand All @@ -42,15 +42,15 @@ RUN dnf -y install \
gcc-gfortran

# Dependencies
RUN dnf --refresh -y install \
RUN dnf --assumeyes install \
python3-devel \
eigen3-devel \
libxml2-devel \
graphviz-devel \
gsl-devel

# VILLASnode dependencies
RUN dnf -y install \
RUN dnf --assumeyes install \
openssl-devel \
libuuid-devel \
libconfig-devel \
Expand All @@ -63,7 +63,7 @@ RUN dnf -y install \
zlib-devel

# CUDARPC and dependencies
RUN dnf install -y \
RUN dnf --assumeyes install \
make bash git gcc autoconf libtool automake \
ncurses-devel zlib-devel binutils-devel mesa-libGL-devel \
libvdpau-devel mesa-libEGL-devel openssl-devel rpcbind \
Expand All @@ -81,7 +81,7 @@ ENV PATH="$PWD/cricket/bin:${PATH}"
ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"

# Profiling dependencies
RUN dnf -y install \
RUN dnf --assumeyes install \
graphviz \
libasan \
cppcheck \
Expand Down Expand Up @@ -118,13 +118,12 @@ ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"

# Python dependencies
ADD project.toml .
RUN pip3 install --upgrade setuptools
RUN pip3 install --upgrade wheel
RUN pip3 install --upgrade setuptools wheel
RUN pip3 install .[test,docs]

# Remove this part in the future and use dedicated Jupyter Dockerfile
# Activate Jupyter extensions
RUN dnf -y --refresh install npm
RUN dnf --assumeyes install npm
RUN pip3 install jupyter jupyter_contrib_nbextensions nbconvert nbformat

EXPOSE 8888
12 changes: 6 additions & 6 deletions packaging/Docker/Dockerfile.manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LABEL \
org.opencontainers.image.url="http://dpsim.fein-aachen.org/" \
org.opencontainers.image.source="https://github.com/sogno-platform/dpsim"

RUN dnf -y update
RUN dnf --refresh -y update
RUN yum install -y epel-release

# Toolchain
Expand All @@ -32,22 +32,22 @@ RUN yum install -y \
cppcheck

# Tools needed for developement
RUN dnf -y install \
RUN dnf --assumeyes install \
doxygen graphviz \
gdb \
procps-ng

# Dependencies
RUN dnf --refresh -y install \
RUN dnf --assumeyes install \
python3-devel \
eigen3-devel \
libxml2-devel \
graphviz-devel
graphviz-devel \
fmt-devel

RUN yum install -y fmt-devel

# Install some debuginfos
RUN dnf -y debuginfo-install \
RUN dnf --assumeyes debuginfo-install \
python3

# Build & Install sundials
Expand Down
2 changes: 1 addition & 1 deletion packaging/Docker/Dockerfile.rpm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LABEL \
org.opencontainers.image.source = "https://github.com/sogno-platform/dpsim"

COPY --from=builder /dpsim/build/*.rpm /tmp
RUN dnf -y install /tmp/*.rpm
RUN dnf --assumeyes install /tmp/*.rpm

ADD project.toml .
RUN pip3 install .[test,docs]
Expand Down
3 changes: 2 additions & 1 deletion packaging/Docker/Dockerfile.shmem
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ EXPOSE 1883

WORKDIR /
RUN chmod +x /dpsim/configs/shmem_CIGRE_MV_PF/start_Shmem_CIGRE_MV_PowerFlowTest_LoadProfiles.sh
RUN dnf install procps -y
RUN dnf --assumeyes install \
procps

CMD ["sh", "-c", "sleep 5 && cd /dpsim && ./configs/shmem_CIGRE_MV_PF/start_Shmem_CIGRE_MV_PowerFlowTest_LoadProfiles.sh"]

0 comments on commit 35fa11c

Please sign in to comment.