Skip to content

Commit 1c87881

Browse files
committed
docker: cleanup and add gdb
1 parent e8cf4a6 commit 1c87881

5 files changed

+23
-52
lines changed

docker/Dockerfile.amd

+4-23
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,10 @@ ARG OMPI_BRANCH="v5.0.x"
1414
RUN rm /etc/apt/sources.list.d/* \
1515
&& apt-get update \
1616
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
17-
ca-certificates \
18-
git \
19-
ssh \
20-
make \
21-
vim \
22-
nano \
23-
libtinfo* \
24-
initramfs-tools \
25-
libelf-dev \
26-
numactl \
27-
wget \
28-
tmux \
29-
build-essential \
30-
autoconf \
31-
automake \
32-
libtool \
33-
pkg-config \
34-
libnuma* \
35-
gfortran \
36-
flex \
37-
hwloc \
38-
gdb \
39-
&& apt-get clean
17+
ca-certificates git ssh make vim libtinfo* initramfs-tools libelf-dev \
18+
numactl wget tmux build-essential autoconf automake libtool \
19+
pkg-config libnuma* gfortran flex hwloc && \
20+
apt-get clean
4021

4122
# Requires cmake > 3.22
4223
RUN mkdir -p /opt/cmake \

docker/Dockerfile.cpu

+3-10
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,15 @@ ARG gcc=""
1111

1212
ENV DEBIAN_FRONTEND=noninteractive
1313

14-
# Add repo for other python versions
15-
RUN apt-get update && \
16-
apt-get install -y software-properties-common
17-
1814
# Install python
1915
RUN apt-get update && \
20-
apt-get install -y dh-autoreconf python3-venv python3-dev python3-pip gdb
16+
apt-get install -y software-properties-common dh-autoreconf python3-venv python3-dev python3-pip
2117

2218
# Install for basic base not containing it
2319
RUN apt-get install -y vim wget git flex libnuma-dev tmux \
2420
numactl hwloc curl \
2521
autoconf libtool build-essential procps software-properties-common
2622

27-
2823
# Install compilersx
2924
RUN if [ -n "$gcc" ]; then \
3025
apt-get install libgmp-dev libmpc-dev libmpfr-dev libisl-dev binutils texinfo -y && \
@@ -46,10 +41,8 @@ RUN if [ -n "$gcc" ]; then \
4641
RUN curl https://raw.githubusercontent.com/Azrael3000/tmpi/master/tmpi -o /usr/local/bin/tmpi
4742

4843
# Install OpenGL library, necessary for the installation of GemPy
49-
RUN apt-get install -y libgl1-mesa-glx | echo "Skipping libgl1-mesa-glx installation, outdated"
50-
RUN apt-get install -y libgl1 libglx-mesa0 | echo "Skipping libgl1 libglx-mesa0 installation, not recent enough"
51-
52-
RUN apt-get clean && apt-get autoclean && apt-get autoremove -y && \
44+
RUN apt-get install -y libgl1-mesa-glx && \
45+
apt-get clean && apt-get autoclean && apt-get autoremove -y && \
5346
rm -rf /var/lib/apt/lists/*
5447

5548
ARG OMPI_BRANCH="v5.0.x"

docker/Dockerfile.devito

+10-7
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ ARG GROUP_ID=1000
1313

1414
################## Install devito ############################################
1515

16-
# Update if outdated and install extras
17-
RUN apt-get update && \
18-
apt-get install -y git cmake libncurses5-dev libncursesw5-dev libdrm-dev libsystemd-dev
19-
2016
# Usefull utilities
2117
# Nvtop
2218
RUN git clone https://github.com/Syllo/nvtop.git /app/nvtop && \
@@ -43,15 +39,22 @@ RUN eval "$MPI4PY_FLAGS /venv/bin/pip install --no-cache-dir --verbose -r /app/d
4339
# Devito
4440
RUN /venv/bin/pip install --no-cache-dir -e /app/devito[extras,tests] && rm -rf ~/.cache/pip
4541

46-
FROM $base as user
47-
# COPY is much faster than RUN chown by order of magnitude so we have a final step that
48-
# just copies the built image into the user.
42+
FROM $base AS utilities
43+
44+
# Update if outdated and install extras
45+
RUN apt-get update && apt-get install -y git cmake \
46+
libncurses5-dev libncursesw5-dev libdrm-dev libsystemd-dev \
47+
python3-gdb gdb
4948

5049
# Last installs (such as gdb needed in user mode) and cleanup
5150
RUN apt-get update && apt install gdb -y && \
5251
apt-get clean && apt-get autoclean && apt-get autoremove -y && \
5352
rm -rf /var/lib/apt/lists/*
5453

54+
FROM utilities as user
55+
# COPY is much faster than RUN chown by order of magnitude so we have a final step that
56+
# just copies the built image into the user.
57+
5558
# User/Group Ids
5659
ARG USER_ID=1000
5760
ARG GROUP_ID=1000

docker/Dockerfile.intel

+5-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND noninteractive
1010

1111
# Install python
1212
RUN apt-get update && \
13-
apt-get install -y dh-autoreconf python3-venv python3-dev python3-pip gdb
13+
apt-get install -y dh-autoreconf python3-venv python3-dev python3-pip
1414

1515
# Install for basic base not containing it
1616
RUN apt-get install -y vim wget git flex libnuma-dev tmux \
@@ -23,9 +23,6 @@ RUN curl https://raw.githubusercontent.com/Azrael3000/tmpi/master/tmpi -o /usr/l
2323
# Install OpenGL library, necessary for the installation of GemPy
2424
RUN apt-get install -y libgl1-mesa-glx
2525

26-
RUN apt-get clean && apt-get autoclean && apt-get autoremove -y && \
27-
rm -rf /var/lib/apt/lists/*
28-
2926
EXPOSE 8888
3027
CMD ["/bin/bash"]
3128

@@ -56,19 +53,16 @@ RUN apt-get update -y && apt-get dist-upgrade -y && \
5653
libegl-mesa0 libegl1-mesa libegl1-mesa-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri \
5754
libglapi-mesa libgles2-mesa-dev libglx-mesa0 libigdgmm12 libxatracker2 mesa-va-drivers \
5855
mesa-vdpau-drivers mesa-vulkan-drivers va-driver-all vainfo hwinfo clinfo \
59-
# XPU-smi requirements
60-
intel-gsc libmfx-tools intel-metrics-discovery intel-metrics-library \
56+
# XPU-SMI
57+
pciutils libkmod-dev intel-fw-gpu xpu-smi \
6158
# Development packages
6259
libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev
6360

64-
# Install xpu-smi for device detection
65-
RUN wget https://github.com/intel/xpumanager/releases/download/V1.2.39/xpu-smi_1.2.39_20240906.085820.11f3c29a+deb10u1_amd64.deb && \
66-
apt install -y ./xpu-smi_1.2.39_20240906.085820.11f3c29a+deb10u1_amd64.deb && \
67-
rm xpu-smi_1.2.39_20240906.085820.11f3c29a+deb10u1_amd64.deb
68-
6961
ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh intel64 && '
7062
ENV MPI4PY_RC_RECV_MPROBE=0
7163

64+
RUN apt-get clean && apt-get autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
65+
7266
##############################################################
7367
# ICC image
7468
# This is a legacy setup that is not built anymore but kept for reference

docker/Dockerfile.nvidia

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV DEBIAN_FRONTEND noninteractive
1616
# Install python
1717
RUN apt-get update && \
1818
apt-get install -y -q gpg apt-utils curl wget vim libnuma-dev tmux numactl \
19-
dh-autoreconf python3-venv python3-dev python3-pip gdb
19+
dh-autoreconf python3-venv python3-dev python3-pip
2020

2121
# nodesource: nvdashboard requires nodejs>=10
2222
RUN curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | gpg --yes --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg

0 commit comments

Comments
 (0)