Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add Dockerfile.debug for extended image with deb tools #121

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# syntax=docker/dockerfile:latest

FROM ghcr.io/bnlnpps/esi-shell:1.3.1

ARG DEBIAN_FRONTEND=noninteractive

RUN spack install root \
&& spack clean -a

RUN spack install geant4+threads+motif+opengl+x11+qt ^qt \
&& spack clean -a

RUN spack install geant4~threads+motif+opengl+x11+qt ^qt \
&& spack clean -a

RUN spack install [email protected]+qt \
&& spack clean -a

RUN <<"EOF"
spack module tcl refresh -y
rm -fr /opt/modules && cp -r /opt/spack/share/spack/modules/linux-ubuntu22.04-x86_64_v3 /opt/modules
echo "module use --append /opt/modules" > /etc/profile.d/z10_load_spack_modules.sh
spack module tcl loads [email protected]+qt xerces-c openssl clhep boost cmake mesa glew glfw glm glu nlohmann-json plog libxrandr root >> /etc/profile.d/z10_load_spack_modules.sh
rm -fr /opt/spack/share/spack/modules/$linux-ubuntu22.04-x86_64_v3
EOF

# Follow instructions at https://docs.nvidia.com/nsight-systems/InstallationGuide/index.html#package-manager-installation
RUN <<"EOF"
apt update
apt install -y --no-install-recommends gnupg
echo "deb http://developer.download.nvidia.com/devtools/repos/ubuntu$(source /etc/lsb-release; echo "$DISTRIB_RELEASE" | tr -d .)/$(dpkg --print-architecture) /" | tee /etc/apt/sources.list.d/nvidia-devtools.list
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
apt update
apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
apt install -y libqt5x11extras5
apt install -y libxcb-xinerama0 libxcb-xinerama0-dev
apt install -y libxkbcommon-x11-0
apt install -y nsight-systems-cli nsight-systems libgl1-mesa-glx libsm6 libx11-6 libxext6 libxrender1 libxtst6 libxcb1
apt install -y mesa-utils x11-apps
apt clean
EOF

# Install esi-opticks
COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .
RUN mkdir -p $OPTIX_DIR && ./NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh --skip-license --prefix=$OPTIX_DIR

RUN rm -fr $OPTICKS_PREFIX
RUN cmake -S $OPTICKS_HOME -B $OPTICKS_PREFIX/build -DCMAKE_INSTALL_PREFIX=$OPTICKS_PREFIX -DCMAKE_BUILD_TYPE=Debug \
&& cmake --build $OPTICKS_PREFIX/build --parallel --target install

RUN rm -fr $OPTIX_DIR/* $ESI_DIR/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh

COPY nsight-compute-linux-2024.3.2.3-34861637.run .

RUN <<"EOF"
./nsight-compute-linux-2024.3.2.3-34861637.run --quiet -- -noprompt
rm -fr nsight-compute-linux-2024.3.2.3-34861637.run
EOF

RUN apt update && apt install -y gdb

ENV OPTICKS_EVENT_MODE=DebugHeavy
ENV GEOM=dummy
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ When running `esi-shell`, make sure that the environment variable `OPTIX_DIR` is
to the directory where OptiX is installed. If not set, the default path `OPTIX_DIR=/usr/local/optix`
will be mounted insdie the container at runtime.

One can also build an extended image with additional tools installed to assist with debugging and visualization.

```shell
docker build -t esi-shell:debug -f Dockerfile.debug .
```


#### Using `esi-shell` Docker Images

Expand Down