Skip to content

Commit 7843821

Browse files
authored
Upgrade all images (#215)
Description of changes: * migrate to Ubuntu 24.04, Debian 12 and Fedora 40 * install Kokkos libraries
2 parents 3399039 + 2fc0dee commit 7843821

10 files changed

+177
-98
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
image: ['debian', 'fedora', 'ubuntu-22.04', 'ubuntu-wo-dependencies']
12+
image:
13+
- debian
14+
- fedora
15+
- ubuntu
16+
- ubuntu-wo-dependencies
1317
steps:
1418
- uses: actions/checkout@main
1519
- name: Build and deploy

docker/Dockerfile-debian

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
FROM debian:bullseye AS image_base
2-
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list && \
3-
apt-get update && \
1+
FROM debian:bookworm AS image_base
2+
RUN apt-get update && \
43
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
54
apt-utils \
65
build-essential \
7-
curl \
6+
cmake \
87
ccache \
8+
curl \
99
cython3 \
1010
gdb \
1111
git \
12-
libboost-dev libboost-serialization-dev libboost-mpi-dev libboost-filesystem-dev libboost-test-dev \
12+
libboost-dev \
13+
libboost-filesystem-dev \
14+
libboost-mpi-dev \
15+
libboost-serialization-dev \
16+
libboost-test-dev \
1317
libfftw3-dev \
1418
libhdf5-openmpi-dev \
1519
libpython3-dev \
1620
openmpi-bin \
1721
python3 \
1822
python3-h5py \
1923
python3-numpy \
24+
python3-packaging \
2025
python3-pip \
2126
python3-scipy \
2227
python3-setuptools \
2328
python3-vtk9 \
2429
vim && \
25-
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --target-release bullseye-backports \
26-
cmake && \
2730
apt-get clean && \
2831
rm -rf /var/lib/apt/lists/*
2932

docker/Dockerfile-fedora

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM fedora:36
1+
FROM fedora:40
22
RUN dnf -y install \
33
blas-devel \
44
boost-devel \
@@ -7,6 +7,7 @@ RUN dnf -y install \
77
cmake \
88
environment-modules \
99
fftw-devel \
10+
fftw-mpich-devel \
1011
gcc \
1112
gcc-c++ \
1213
gdb \
@@ -18,8 +19,10 @@ RUN dnf -y install \
1819
python3 \
1920
python3-devel \
2021
python3-Cython \
22+
python3-lxml \
2123
python3-numpy \
2224
python3-scipy \
25+
python3-packaging \
2326
python3-pip \
2427
python3-setuptools \
2528
python3-h5py \

docker/Dockerfile-ubuntu

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
FROM ubuntu:noble
2+
RUN apt-get update && \
3+
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
4+
apt-utils \
5+
autoconf \
6+
automake \
7+
build-essential \
8+
ccache \
9+
clang-18 clang-tidy-18 clang-format-18 llvm-18 libclang-rt-18-dev \
10+
cmake \
11+
cmake-format \
12+
curl \
13+
cython3 \
14+
doxygen \
15+
ffmpeg \
16+
gcc-12 g++-12 \
17+
gcc-13 g++-13 \
18+
gdb \
19+
gfortran \
20+
git \
21+
gnupg \
22+
graphviz \
23+
ipython3 \
24+
jq \
25+
jupyter-client \
26+
jupyter-core \
27+
jupyter-nbconvert \
28+
lcov \
29+
libblas-dev \
30+
libboost-dev \
31+
libboost-filesystem-dev \
32+
libboost-mpi-dev \
33+
libboost-serialization-dev \
34+
libboost-test-dev \
35+
libdigest-sha-perl \
36+
libfftw3-dev \
37+
libfftw3-mpi-dev \
38+
libgsl-dev \
39+
libhdf5-openmpi-dev \
40+
liblapack-dev \
41+
libopenmpi-dev \
42+
libthrust-dev \
43+
libtool \
44+
nvidia-cuda-toolkit \
45+
openmpi-bin \
46+
openssh-client \
47+
perl \
48+
pkg-config \
49+
pre-commit \
50+
python3 \
51+
python3-dev \
52+
pylint \
53+
python3-coverage \
54+
python3-dev \
55+
python3-h5py \
56+
python3-ipykernel \
57+
python3-jinja2 \
58+
python3-lxml \
59+
python3-matplotlib \
60+
python3-nbconvert \
61+
python3-numpy \
62+
python3-numpydoc \
63+
python3-pint \
64+
python3-pip \
65+
python3-packaging \
66+
python3-requests \
67+
python3-scipy \
68+
python3-setuptools \
69+
python3-sympy \
70+
python3-sphinx \
71+
python3-sphinxcontrib.bibtex \
72+
python3-tqdm \
73+
python3-venv \
74+
python3-vtk9 \
75+
rsync \
76+
texlive-base \
77+
vim && \
78+
apt-get clean && \
79+
rm -rf /var/lib/apt/lists/*
80+
81+
COPY install-pfft.sh /tmp
82+
COPY install-scafacos.sh /tmp
83+
COPY install-kokkos.sh /tmp
84+
85+
RUN sh /tmp/install-pfft.sh && rm /tmp/install-pfft.sh && \
86+
sh /tmp/install-scafacos.sh && rm /tmp/install-scafacos.sh && \
87+
sh /tmp/install-kokkos.sh && rm /tmp/install-kokkos.sh && \
88+
ldconfig
89+
90+
ENV NVIDIA_VISIBLE_DEVICES all
91+
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
92+
ENV JUPYTER_PLATFORM_DIRS 1
93+
94+
COPY --chown=1000:1000 jupyter_nbconvert_config.json /tmp
95+
96+
RUN userdel ubuntu && rm -rf /home/ubuntu && useradd -u 1000 -m espresso
97+
ENV HOME="/home/espresso"
98+
RUN echo | cpan && \
99+
echo | cpan JSON::XS && \
100+
chown -R espresso:espresso /home/espresso/.cpan/
101+
USER espresso
102+
ENV VIRTUAL_ENV "$HOME/venv"
103+
ENV PATH "$HOME/.local/bin:$VIRTUAL_ENV/bin:$PATH"
104+
RUN cd "${HOME}" && \
105+
python3 -m venv --system-site-packages venv && \
106+
. venv/bin/activate && \
107+
python3 -m pip install --no-cache \
108+
jupyterlab==4.0.13 \
109+
pep8==1.7.1 \
110+
autopep8==2.1.0 \
111+
pycodestyle==2.11.1 \
112+
sphinx-toggleprompt==0.5.2 && \
113+
jupyter_config_root=$(jupyter --paths --json | jq ".config[0]") && \
114+
jupyter_config_root=${jupyter_config_root#\"} && \
115+
jupyter_config_root=${jupyter_config_root%\"} && \
116+
jupyter_kernels_root=$(jupyter --paths --json | jq ".data[0]")/kernels && \
117+
jupyter_kernels_root=${jupyter_kernels_root#\"} && \
118+
jupyter_kernels_root=${jupyter_kernels_root%\"} && \
119+
mkdir -p "${jupyter_config_root}" "${jupyter_kernels_root}" && \
120+
mv "/tmp/jupyter_nbconvert_config.json" "${jupyter_config_root}/" && \
121+
ln -s "${VIRTUAL_ENV}/share/jupyter/kernels/python3" "${jupyter_kernels_root}/python3" && \
122+
deactivate && \
123+
mkdir -p "${HOME}/.local/bin" && \
124+
mkdir -p "${HOME}/.local/etc/alternatives" && \
125+
mkdir -p "${HOME}/.local/var/lib/alternatives"
126+
WORKDIR /home/espresso

docker/Dockerfile-ubuntu-22.04

Lines changed: 0 additions & 84 deletions
This file was deleted.

docker/Dockerfile-ubuntu-wo-dependencies

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy AS image_base
1+
FROM ubuntu:noble AS image_base
22
RUN apt-get update && \
33
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
44
apt-utils \
@@ -7,10 +7,14 @@ RUN apt-get update && \
77
ccache \
88
cmake \
99
cython3 \
10-
gcc-11 g++-11 \
10+
gcc-13 g++-13 \
1111
gdb \
1212
git \
13-
libboost-dev libboost-serialization-dev libboost-mpi-dev libboost-filesystem-dev libboost-test-dev \
13+
libboost-dev \
14+
libboost-filesystem-dev \
15+
libboost-mpi-dev \
16+
libboost-serialization-dev \
17+
libboost-test-dev \
1418
libopenmpi-dev \
1519
openssh-client \
1620
openmpi-bin \
@@ -19,6 +23,7 @@ RUN apt-get update && \
1923
python3-h5py \
2024
python3-lxml \
2125
python3-numpy \
26+
python3-packaging \
2227
python3-pip \
2328
python3-scipy \
2429
python3-setuptools \

docker/install-kokkos.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
cd /tmp
6+
7+
git clone -b 4.3.00 https://github.com/kokkos/kokkos
8+
cd kokkos/
9+
mkdir build
10+
cd build/
11+
cmake .. -D Kokkos_ENABLE_CUDA=OFF -DKokkos_ENABLE_OPENMP=ON
12+
make -j $(nproc) install
13+
cd
14+
rm -r /tmp/kokkos
15+
ldconfig

docker/install-pfft.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
set -e
44

docker/install-scafacos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
set -e
44

docker/jupyter_nbconvert_config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 1,
3+
"Exporter": {
4+
"require_js_url": "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js",
5+
"mathjax_url": "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS_CHTML-full,Safe"
6+
}
7+
}

0 commit comments

Comments
 (0)