From 091dbb839482c95304285769d5748a1fc4da7685 Mon Sep 17 00:00:00 2001 From: mloubout Date: Tue, 1 Aug 2023 07:49:00 -0400 Subject: [PATCH] docker: add nvtop --- docker/Dockerfile.cpu | 5 ----- docker/Dockerfile.devito | 13 +++++++++++++ docker/README.md | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile.cpu b/docker/Dockerfile.cpu index 478c702c8e0..afa26ceff47 100644 --- a/docker/Dockerfile.cpu +++ b/docker/Dockerfile.cpu @@ -72,11 +72,6 @@ ENV PATH $I_MPI_ROOT/libfabric/bin:$I_MPI_ROOT/bin:$I_ICC_ROOT/linux/bin/intel64 ENV LD_LIBRARY_PATH $I_MPI_ROOT/libfabric/lib:$I_MPI_ROOT/lib/release:$I_MPI_ROOT/lib:$I_ICC_ROOT/linux/lib:$I_ICC_ROOT/linux/lib/x64:$I_ICC_ROOT/linux/compiler/lib/intel64_lin:${LD_LIBRARY_PATH} ENV FI_PROVIDER_PATH $I_MPI_ROOT/libfabric/lib/prov:/usr/lib64/libfabric:${LD_LIBRARY_PATH} -# Install intelpython -RUN wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/03aae3a8-623a-47cf-9655-5dd8fcf86430/l_pythoni39_oneapi_p_2023.2.0.49422.sh && \ - chmod +x l_pythoni39_oneapi_p_2023.2.0.49422.sh && ./l_pythoni39_oneapi_p_2023.2.0.49422.sh -r yes -a -s --eula accept -ENV PATH /opt/intel/oneapi/intelpython/python3.9/bin:${PATH} - ############################################################## # ICC image # This is a legacy setup that is not built anymore but kept for reference diff --git a/docker/Dockerfile.devito b/docker/Dockerfile.devito index 089ec5b2f8c..9c5578844e9 100644 --- a/docker/Dockerfile.devito +++ b/docker/Dockerfile.devito @@ -27,6 +27,16 @@ RUN python3 -m venv /venv && \ /venv/bin/pip install --no-cache-dir -e /app/devito[extras,mpi,tests] && \ rm -rf ~/.cache/pip +# Usefull utilities +# Nvtop +RUN apt update && apt install -y git cmake libncurses5-dev libncursesw5-dev libdrm-dev libsystemd-dev cmake && \ + git clone https://github.com/Syllo/nvtop.git /app/nvtop && \ + mkdir -p /app/nvtop/build && cd /app/nvtop/build && \ + cmake .. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON -DINTEL_SUPPORT=ON && \ + make && \ + make install && \ + ln -fs /app/nvtop/build/src/nvtop /venv/bin/nvtop + # Safety cleanup RUN apt-get clean && apt-get autoclean && apt-get autoremove && \ rm -rf /var/lib/apt/lists/* @@ -63,6 +73,9 @@ RUN chmod +x /print-defaults /jupyter /tests /docker-entrypoint.sh # Venv COPY --from=builder --chown=app:app /venv /venv +# opt +COPY --from=builder --chown=app:app /opt /opt + # Install codecov WORKDIR /app/devito RUN curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && chown app:app codecov diff --git a/docker/README.md b/docker/README.md index 3df6b0043bc..dbb79b5a3e3 100644 --- a/docker/README.md +++ b/docker/README.md @@ -10,7 +10,7 @@ Devito provides several images that target different architectures and compilers We provide two CPU images: - `devito:gcc-*` with the standard GNU gcc compiler. -- `devito:icx-*` with the Intel C compiler for Intel architectures also configured with `intelpython3`. +- `devito:icx-*` with the Intel C compiler for Intel architectures. These images provide a working environment for any CPU architecture and come with [Devito], `gcc/icx` and `mpi` preinstalled, and utilities such as `jupyter` for usability and exploration of the package.