Skip to content
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
4 changes: 4 additions & 0 deletions .github/workflows/docker_build_tpls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ jobs:
DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1
TPL_DOCKERFILE: docker/tpl-rockylinux-gcc-cuda-12.Dockerfile
RUNS_ON: Runner_4core_16GB
- name: Rockylinux (8, gcc 13.3, cuda 12.9.1, pygeosx)
DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1
TPL_DOCKERFILE: docker/tpl-rockylinux-gcc-cuda-12-pygeosx.Dockerfile
RUNS_ON: Runner_4core_16GB
- name: Rockylinux (8, clang 17.0.6, cuda 12.9.1)
DOCKER_REPOSITORY: geosx/rockylinux8-clang17-cuda12.9.1
TPL_DOCKERFILE: docker/tpl-rockylinux-clang-cuda-12.Dockerfile
Expand Down
158 changes: 158 additions & 0 deletions docker/rocky-spack-pygeosx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
spack:
config:
install_tree:
root: $spack/..
projections:
all: '{compiler.name}-{compiler.version}/{name}-{version}-{hash}'
misc_cache: $spack/../misc_cache
test_stage: $spack/../test_stage
build_stage::
- $spack/../build_stage

# Regular TPLs do not need views
view: false

# Include shared variants and versions
include:
- ../defaults.yaml
- ../versions.yaml

compilers::
- compiler:
extra_rpaths: []
flags:
cflags: -pthread
cxxflags: -pthread
modules: []
operating_system: rocky8
paths:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
spec: clang@17.0.6
target: x86_64
- compiler:
extra_rpaths: []
flags:
cflags: -pthread
cxxflags: -pthread
modules: []
operating_system: rocky8
paths:
cc: /opt/rh/gcc-toolset-13/root/usr/bin/gcc
cxx: /opt/rh/gcc-toolset-13/root/usr/bin/g++
f77: /opt/rh/gcc-toolset-13/root/usr/bin/gfortran
fc: /opt/rh/gcc-toolset-13/root/usr/bin/gfortran
spec: gcc@13.3.1
target: x86_64

packages:
all:
target: [x86_64]
compiler: [gcc, clang]
providers:
blas: [netlib-lapack]
lapack: [netlib-lapack]
mpi: [openmpi]

autoconf:
version: [2.71]
buildable: false
externals:
- spec: autoconf@2.71
prefix: /usr
automake:
version: [1.16.5]
buildable: false
externals:
- spec: automake@1.16.5
prefix: /usr
cmake:
version: [3.28.6]
buildable: false
externals:
- spec: cmake@3.28.6
prefix: /usr/local
cuda:
buildable: False
externals:
- spec: cuda@12.9.1%gcc@13.3.1 +allow-unsupported-compilers
prefix: /usr/local/cuda
- spec: cuda@12.9.1%clang@17.0.6 +allow-unsupported-compilers
prefix: /usr/local/cuda
m4:
buildable: false
externals:
- spec: m4@1.4.18
prefix: /usr

# Spack may grab for mpi & we don't want to use them
mpi:
buildable: false

netlib-lapack:
buildable: false
externals:
- spec: netlib-lapack@3.8.0
prefix: /usr
netlib-blas:
buildable: false
externals:
- spec: netlib-blas@3.8.0
prefix: /usr
openmpi:
externals:
- spec: openmpi@4.1.1
prefix: /usr/lib64/openmpi
perl:
buildable: false
externals:
- spec: perl@5.26.3
prefix: /usr
pkg-config:
buildable: false
externals:
- spec: pkg-config@1.4.2
prefix: /usr
# python:
# buildable: false
# externals:
# - spec: python@3.6.8
# prefix: /usr
tar:
buildable: false
externals:
- spec: tar@1.34
prefix: /usr
unzip:
buildable: false
externals:
- spec: unzip@6.0
prefix: /usr
xz:
buildable: false
externals:
- spec: xz@5.2.5
prefix: /usr
# Pygeosx dependencies
openssl:
buildable: false
externals:
- spec: openssl@1.1.1k
prefix: /usr
tk:
buildable: false
externals:
- spec: tk@8.6.8
prefix: /usr
tcl:
buildable: false
externals:
- spec: tcl@8.6.8
prefix: /usr
libxcrypt:
buildable: false
externals:
- spec: libxcrypt@4.1.1
prefix: /usr
2 changes: 1 addition & 1 deletion docker/rocky-spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spack:
python:
buildable: false
externals:
- spec: python@3.6.8
- spec: python@3.9.20
prefix: /usr
tar:
buildable: false
Expand Down
116 changes: 116 additions & 0 deletions docker/tpl-rockylinux-clang-cuda-12-pygeosx.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
ARG TMP_DIR=/tmp
ARG SRC_DIR=$TMP_DIR/thirdPartyLibs
ARG BLD_DIR=$TMP_DIR/build

FROM nvidia/cuda:12.9.1-devel-rockylinux8 AS tpl_toolchain_intersect_geosx_toolchain
ARG SRC_DIR

ARG INSTALL_DIR
ENV GEOSX_TPL_DIR=$INSTALL_DIR

# Installing dependencies
RUN dnf clean all && \
dnf -y update && \
dnf -y install \
which \
gcc-toolset-13 \
python3.9 \
zlib-devel \
tbb \
blas \
lapack \
openmpi \
openmpi-devel \
# Additional spack dependencies
python3-pip \
python3-tkinter \
unzip \
mpfr-devel \
bzip2 \
gnupg \
xz \
python3-virtualenv

# Install clingo for Spack
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install clingo

# Custom install script for CMake or other tools
RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh

# Installing TPL's
FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain
ARG SRC_DIR
ARG BLD_DIR

# Install additional required packages
RUN dnf clean all && \
dnf -y update && \
dnf -y install \
tbb-devel \
bc \
file \
patch \
ca-certificates \
autoconf \
automake \
m4 \
git

# Run uberenv
# Have to create install directory first for uberenv
# -k flag is to ignore SSL errors
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
# Create symlink to openmpi include directory
ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \
# Create symlinks to blas/lapack libraries
ln -s /usr/lib64/libblas.so.3 /usr/lib64/libblas.so && \
ln -s /usr/lib64/liblapack.so.3 /usr/lib64/liblapack.so && \
./scripts/uberenv/uberenv.py \
--spec "%gcc@13.3.1+cuda~uncrustify~openmp+pygeosxdeps cuda_arch=70 ^cuda@12.9.1+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi" \
--spack-env-file=${SRC_DIR}/docker/rocky-spack-pygeosx.yaml \
--project-json=.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
-k && \
# Remove host-config generated for LvArray
rm lvarray* && \
# Rename and copy spack-generated host-config to root directory
cp *.cmake /spack-generated.cmake && \
# Remove extraneous spack files
cd ${GEOSX_TPL_DIR} && \
rm -rf bin/ build_stage/ misc_cache/ spack/ spack_env/ .spack-db/

# Extract only TPL's from the previous stage
FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain
ARG SRC_DIR

COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR

# Extract the generated host-config
COPY --from=tpl_toolchain /spack-generated.cmake /

# Final installation of packages and tools
RUN dnf clean all && \
rm -rf /var/cache/dnf && \
dnf -y install dnf-plugins-core && \
dnf config-manager --set-enabled devel && \
dnf -y update && \
dnf -y install \
openssh-clients \
ca-certificates \
curl \
python3 \
texlive \
graphviz \
ninja-build \
git && \
# Regenerate symlink to openmpi include directory
ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \
# Regenerate symlinks to blas/lapack libraries
ln -s /usr/lib64/libblas.so.3 /usr/lib64/libblas.so && \
ln -s /usr/lib64/liblapack.so.3 /usr/lib64/liblapack.so

# Install sccache
RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh
ENV SCCACHE=/opt/sccache/bin/sccache
Loading
Loading