-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
11 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,172 +1,28 @@ | ||
FROM docker.io/nvidia/cuda:11.8.0-base-ubuntu22.04 | ||
FROM docker.io/nvidia/cuda:12.3.0-devel-ubuntu22.04 | ||
|
||
# {{{ readme | ||
# ubjg: | ||
# cd /tmp2/JG/ascent/ | ||
# sudo docker build -f Dockerfile_1 -t deleteme:latest . | ||
# push to jfrog (buildah): | ||
# # check src dir | ||
# # scp [email protected]:... | ||
# salloc -N1 -C'gpu&contbuild' -A`id -gn` -t1:0:0 | ||
# ssh $SLURM_NODELIST | ||
# module load daint-gpu Buildah/1.26.1 | ||
# buildah bud --format=docker --tag sph-exa_base:cuda -f Dockerfile_1 . | ||
# # TODO stop using art.cscs.ch, use jfrog.svc.cscs.ch: | ||
# buildah login -u $USER art.cscs.ch | ||
# buildah push sph-exa_base:cuda docker://art.cscs.ch/contbuild/testing/jg/sph-exa_base:cuda | ||
# #buildah pull art.cscs.ch/contbuild/testing/jg/sph-exa_base:cuda | ||
# buildah login -u $USER jfrog.svc.cscs.ch | ||
# buildah push sph-exa_base:cuda docker://jfrog.svc.cscs.ch/contbuild/testing/pasc/sphexa/sph-exa_base:cuda | ||
# # --> test with: hpctools.git/reframechecks/containers/reframe_ci.py | ||
# push to dockerhub: | ||
# sudo docker login -u sphexa | ||
# sudo docker tag deleteme:latest sphexa/ascent:latest | ||
# sudo docker push sphexa/ascent:latest | ||
# }}} | ||
|
||
#{{{ variables: | ||
ENV TZ Europe/Zurich | ||
ENV DEPS_PATH 'ftp://ftp.cscs.ch/out/jgp/hpc/containers' | ||
#}}} | ||
|
||
#{{{ apt: | ||
# clang-12 libomp-12-dev \ | ||
RUN sed -i '[email protected]@ubuntu.ethz.ch@' /etc/apt/sources.list \ | ||
&& apt update --quiet \ | ||
&& apt upgrade -y --quiet \ | ||
&& echo "## apt:" \ | ||
&& DEBIAN_FRONTEND=noninteractive \ | ||
apt install -y --no-install-recommends \ | ||
libtbb-dev zlib1g-dev git file wget vim-tiny \ | ||
git file wget vim-tiny pkg-config mpich libhdf5-mpich-dev cmake libgtest-dev \ | ||
python-is-python3 python3-pip libpython3-dev python3-numpy python3-matplotlib \ | ||
cuda-nvcc-11-8 libcublas-dev-11-8 pkg-config \ | ||
&& apt clean autoremove | ||
|
||
#{{{ apt | ||
# RUN apt-get update \ | ||
# && apt-get install -y sudo | ||
# # add a new user | ||
# RUN adduser docker-nemo --gecos "Docker Nemo,1,0000,0001" --disabled-password | ||
# RUN echo "docker-nemo:password" | chpasswd \ | ||
# && usermod -aG sudo docker-nemo | ||
# # update and install dependencies | ||
# RUN apt-get install -y \ | ||
# software-properties-common \ | ||
# wget \ | ||
# locate \ | ||
# && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ | ||
# && apt-get update \ | ||
# && apt-get install -y \ | ||
# make \ | ||
# git \ | ||
# curl \ | ||
# vim \ | ||
# && apt-get install -y cmake \ | ||
# && apt-get install -y \ | ||
# gcc \ | ||
# g++ \ | ||
# gfortran | ||
#}}} | ||
#}}} | ||
|
||
#{{{ src: | ||
# wget https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-x86_64.tar.gz | ||
# wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.2/src/hdf5-1.13.2.tar.bz2 | ||
# wget https://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz | ||
# wget https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz | ||
# COPY src/cmake-3.24.0-linux-x86_64.tar.gz /usr/local/games/ | ||
# COPY src/hdf5-1.13.2.tar.bz2 /usr/local/games/ | ||
# COPY src/mpich-3.1.4.tar.gz /usr/local/games/ | ||
# COPY src/release-1.12.1.tar.gz /usr/local/games/ | ||
# insitu: | ||
# COPY src/ascent-v0.8.0-src-with-blt.tar.gz /usr/local/games/ | ||
# COPY src/conduit-v0.8.3-src-with-blt.tar.gz /usr/local/games/ | ||
# COPY src/v0.8.1.tar.gz /usr/local/games/ | ||
# COPY src/v1.7.1.tar.gz /usr/local/games/ | ||
# COPY src/v0.5.1.tar.gz /usr/local/games/ | ||
# = https://github.com/LLNL/blt/archive/refs/tags/v0.5.1.tar.gz | ||
# TODO: glass.h5 | ||
|
||
RUN echo \ | ||
&& echo "## wget:" \ | ||
&& cd /usr/local/games \ | ||
&& wget --quiet $DEPS_PATH/c/CMake/cmake-3.24.0-linux-x86_64.tar.gz \ | ||
&& wget --quiet $DEPS_PATH/m/MPICH/mpich-3.1.4.tar.gz \ | ||
&& wget --quiet $DEPS_PATH/h/hdf5/hdf5-1.13.2.tar.bz2 \ | ||
&& wget --quiet $DEPS_PATH/g/googletest/release-1.12.1.tar.gz \ | ||
&& wget --quiet $DEPS_PATH/in/glass.h5 | ||
#}}} | ||
|
||
#{{{ cmake: | ||
RUN echo \ | ||
&& echo "## cmake:" \ | ||
&& export VV=3.24.0 VVshort=3.24 \ | ||
&& cd /usr/local/games \ | ||
&& tar xf cmake-$VV-linux-x86_64.tar.gz \ | ||
&& cp -a cmake-$VV-linux-x86_64/bin/* /usr/bin/ \ | ||
&& cp -a cmake-$VV-linux-x86_64/share/cmake-$VVshort /usr/share/cmake-$VVshort \ | ||
&& rm -fr cmake-$VV-linux-x86_64.tar.gz cmake-$VV-linux-x86_64/bin/cmake-gui | ||
#}}} | ||
|
||
#{{{ mpich: | ||
RUN echo \ | ||
&& echo "## mpich:" \ | ||
&& cd /usr/local/games \ | ||
&& tar xf mpich-3.1.4.tar.gz \ | ||
&& cd mpich-3.1.4/ \ | ||
&& ./configure --prefix=/usr --enable-fortran=no > /dev/null \ | ||
&& make --quiet -j `grep processor /proc/cpuinfo | wc -l` install > /dev/null \ | ||
&& cd /usr/local/games \ | ||
&& rm -fr mpich-3.1.4 mpich-3.1.4.tar.gz \ | ||
&& ldconfig | ||
#}}} | ||
|
||
#{{{ hdf5: | ||
RUN echo \ | ||
&& echo "## hdf5:" \ | ||
&& export VV=1.13.2 \ | ||
&& cd /usr/local/games \ | ||
&& tar xf hdf5-$VV.tar.bz2 \ | ||
&& cmake \ | ||
-DCMAKE_C_COMPILER:STRING=mpicc \ | ||
-DCMAKE_C_FLAGS:STRING=-w \ | ||
-DONLY_SHARED_LIBS:BOOL=ON \ | ||
-DHDF5_BUILD_HL_LIB:BOOL=ON \ | ||
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \ | ||
-DBUILD_SHARED_LIBS:BOOL=ON \ | ||
-DHDF5_ENABLE_PARALLEL:BOOL=ON \ | ||
-DHDF5_BUILD_TOOLS:BOOL=OFF \ | ||
-DBUILD_STATIC_LIBS=OFF \ | ||
-DHDF5_BUILD_EXAMPLES:BOOL=OFF \ | ||
-DBUILD_TESTING:BOOL=OFF \ | ||
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ | ||
-DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF \ | ||
-DHDF5_ENABLE_THREADSAFE:BOOL=OFF \ | ||
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \ | ||
-DHDF5_BUILD_FORTRAN:BOOL=OFF \ | ||
-DHDF5_BUILD_JAVA:BOOL=OFF \ | ||
-S hdf5-$VV -B build-hdf5 > /dev/null \ | ||
&& cmake --build build-hdf5 -t install -j \ | ||
&& cd /usr/local/games \ | ||
&& rm -fr hdf5-$VV.tar.bz2 hdf5-$VV build-hdf5 | ||
#ln -fs /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so | ||
#ln -fs /usr/lib/x86_64-linux-gnu/libpthread.so.0 /usr/lib/x86_64-linux-gnu/libpthread.so | ||
#}}} | ||
#RUN echo \ | ||
# && echo "## wget:" \ | ||
# && cd /usr/local/games \ | ||
# && wget --quiet $DEPS_PATH/c/CMake/cmake-3.24.0-linux-x86_64.tar.gz \ | ||
# && wget --quiet $DEPS_PATH/m/MPICH/mpich-3.1.4.tar.gz \ | ||
# && wget --quiet $DEPS_PATH/h/hdf5/hdf5-1.13.2.tar.bz2 \ | ||
# && wget --quiet $DEPS_PATH/g/googletest/release-1.12.1.tar.gz \ | ||
# && wget --quiet $DEPS_PATH/in/glass.h5 | ||
|
||
#{{{ googletest: | ||
RUN echo \ | ||
&& echo "## googletest:" \ | ||
&& cd /usr/local/games \ | ||
&& export VV=1.12.1 \ | ||
&& tar xf release-$VV.tar.gz \ | ||
&& rm -f release-$VV.tar.gz | ||
#}}} | ||
|
||
#{{{ analytical_solutions: | ||
RUN echo \ | ||
&& echo "## analytical_solutions + reframe:" \ | ||
&& pip install ReFrame-HPC h5py matplotlib | ||
#}}} | ||
|
||
#{{{ next step: Dockerfile_2 | ||
#}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters