Skip to content

Commit

Permalink
add spack builds
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Oct 3, 2024
1 parent 9cd7eab commit b18eef3
Show file tree
Hide file tree
Showing 10 changed files with 658 additions and 11 deletions.
11 changes: 3 additions & 8 deletions google/laghos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:22.04

# Build command
# docker build -t ghcr.io/converged-computing/ensemble-laghos:libfabric .
# docker push ghcr.io/converged-computing/ensemble-laghos:libfabric
# docker build -t ghcr.io/converged-computing/ensemble-laghos .
# docker push ghcr.io/converged-computing/ensemble-laghos

# Compilers, autotools
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -46,15 +46,10 @@ RUN locale-gen en_US.UTF-8
ENV LANG=C.UTF-8

WORKDIR /opt
RUN git clone -b v1.21.1 /~https://github.com/ofiwg/libfabric.git /opt/libfabric && \
cd /opt/libfabric && ./autogen.sh && \
./configure --enable-efa=yes --enable-tcp=yes --enable-udp=yes --enable-sockets=yes --enable-verbs=yes --enable-shm=yes --enable-mrail=yes --enable-rxd=yes --enable-rxm=yes && \
make -j 4 && make install

RUN wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.gz && \
tar -xzvf openmpi-4.1.2.tar.gz && \
cd openmpi-4.1.2 && \
./configure --with-ofi=/usr/local && \
./configure && \
make -j 4 && make install && ldconfig

# Finally, install oras for saving artifacts
Expand Down
14 changes: 11 additions & 3 deletions google/stream/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive

FROM ubuntu:22.04

# Build command
# docker build -t ghcr.io/converged-computing/ensemble-stream .
# docker push ghcr.io/converged-computing/ensemble-stream

# Compilers, autotools
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -qq install -y --no-install-recommends \
Expand Down Expand Up @@ -54,6 +52,7 @@ RUN wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.g
./configure && \
make -j 4 && make install && ldconfig

# Finally, install oras for saving artifacts
RUN export VERSION="1.1.0" && \
curl -LO "/~https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz" && \
mkdir -p oras-install/ && \
Expand All @@ -64,6 +63,15 @@ RUN export VERSION="1.1.0" && \
ENV PATH=/usr/local/pancakes/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV LD_LIBRARY_PATH=/usr/local/pancakes/lib:/usr/local/lib

RUN apt-get update && apt-get install -y openssh-client openssh-server cmake && apt-get clean
RUN echo " LogLevel ERROR" >> /etc/ssh/ssh_config && \
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \
echo " UserKnownHostsFile=/dev/null" >> /etc/ssh/ssh_config && \
cd /root && \
mkdir -p /run/sshd && \
ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa && chmod og+rX . && \
cd .ssh && cat id_rsa.pub > authorized_keys && chmod 644 authorized_keys
EXPOSE 22
WORKDIR /opt/stream
COPY ./src .
RUN apt-get install -y gfortran && \
Expand Down
84 changes: 84 additions & 0 deletions spack/amg2023/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive

# Build command
# docker build -t ghcr.io/converged-computing/ensemble-amg2023:spack .
# docker push ghcr.io/converged-computing/ensemble-amg2023:spack

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install \
autotools-dev \
autoconf \
automake \
cmake \
git \
python3 \
dnsutils \
openssh-server \
openssh-client \
apt-utils \
gcc \
unzip \
gfortran \
g++ \
build-essential \
software-properties-common

# What we want to install and how we want to install it
# is specified in a manifest file (spack.yaml)
# IMPORTANT: cpu gets +int64, and gpu +mixedint
RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - openmpi@4.1.4 +legacylaunchers" \
&& echo " - pmix@4.2.2" \
&& echo " - amg2023 +mpi +openmp" \
&& echo " - hypre +int64 +openmp" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml

RUN cd /opt/spack-environment \
&& git clone --depth 1 --branch v0.22.1 /~https://github.com/spack/spack.git \
&& . spack/share/spack/setup-env.sh \
&& spack env activate . \
&& spack external find openssh \
&& spack external find cmake \
&& spack install --reuse --fail-fast \
&& spack gc -y

# Modifications to the environment that are necessary to run
RUN cd /opt/spack-environment \
&& . spack/share/spack/setup-env.sh \
&& spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh

WORKDIR /opt
EXPOSE 22

FROM ubuntu:22.04

COPY --from=builder /opt/spack-environment /opt/spack-environment
COPY --from=builder /opt/software /opt/software
COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install --no-install-recommends \
ca-certificates \
openssh-server \
openssh-client \
dnsutils \
curl \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Finally, install oras for saving artifacts
RUN export VERSION="1.1.0" && \
curl -LO "/~https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz" && \
mkdir -p oras-install/ && \
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/ && \
mv oras-install/oras /usr/local/bin/ && \
rm -rf oras_${VERSION}_*.tar.gz oras-install/
80 changes: 80 additions & 0 deletions spack/kripke/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive

# Build command
# docker build -t ghcr.io/converged-computing/ensemble-kripke:spack .
# docker push ghcr.io/converged-computing/ensemble-kripke:spack

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install \
autotools-dev \
autoconf \
automake \
cmake \
git \
python3 \
dnsutils \
openssh-server \
openssh-client \
apt-utils \
gcc \
unzip \
gfortran \
g++ \
build-essential \
software-properties-common

RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - openmpi@4.1.4 +legacylaunchers" \
&& echo " - pmix@4.2.2" \
&& echo " - kripke@1.2.2 +mpi +openmp" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml

RUN cd /opt/spack-environment \
&& git clone --depth 1 --branch v0.22.1 /~https://github.com/spack/spack.git \
&& . spack/share/spack/setup-env.sh \
&& spack env activate . \
&& spack external find openssh \
&& spack external find cmake \
&& spack install --reuse --fail-fast \
&& spack gc -y

# Modifications to the environment that are necessary to run
RUN cd /opt/spack-environment \
&& . spack/share/spack/setup-env.sh \
&& spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh

WORKDIR /opt
EXPOSE 22

FROM ubuntu:22.04

COPY --from=builder /opt/spack-environment /opt/spack-environment
COPY --from=builder /opt/software /opt/software
COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install --no-install-recommends \
ca-certificates \
openssh-server \
openssh-client \
dnsutils \
curl \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Finally, install oras for saving artifacts
RUN export VERSION="1.1.0" && \
curl -LO "/~https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz" && \
mkdir -p oras-install/ && \
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/ && \
mv oras-install/oras /usr/local/bin/ && \
rm -rf oras_${VERSION}_*.tar.gz oras-install/
80 changes: 80 additions & 0 deletions spack/laghos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive

# Build command
# docker build -t ghcr.io/converged-computing/ensemble-laghos:spack .
# docker push ghcr.io/converged-computing/ensemble-laghos:spack

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install \
autotools-dev \
autoconf \
automake \
cmake \
git \
python3 \
dnsutils \
openssh-server \
openssh-client \
apt-utils \
gcc \
unzip \
gfortran \
g++ \
build-essential \
software-properties-common

RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - openmpi@4.1.4 +legacylaunchers" \
&& echo " - pmix@4.2.2" \
&& echo " - laghos" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml

RUN cd /opt/spack-environment \
&& git clone --depth 1 --branch v0.22.1 /~https://github.com/spack/spack.git \
&& . spack/share/spack/setup-env.sh \
&& spack env activate . \
&& spack external find openssh \
&& spack external find cmake \
&& spack install --reuse --fail-fast \
&& spack gc -y

# Modifications to the environment that are necessary to run
RUN cd /opt/spack-environment \
&& . spack/share/spack/setup-env.sh \
&& spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh

WORKDIR /opt
EXPOSE 22

FROM ubuntu:22.04

COPY --from=builder /opt/spack-environment /opt/spack-environment
COPY --from=builder /opt/software /opt/software
COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install --no-install-recommends \
ca-certificates \
openssh-server \
openssh-client \
dnsutils \
curl \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Finally, install oras for saving artifacts
RUN export VERSION="1.1.0" && \
curl -LO "/~https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz" && \
mkdir -p oras-install/ && \
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/ && \
mv oras-install/oras /usr/local/bin/ && \
rm -rf oras_${VERSION}_*.tar.gz oras-install/
80 changes: 80 additions & 0 deletions spack/lammps/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive

# Build command
# docker build -t ghcr.io/converged-computing/ensemble-lammps:spack .
# docker push ghcr.io/converged-computing/ensemble-lammps:spack

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install \
autotools-dev \
autoconf \
automake \
cmake \
git \
python3 \
dnsutils \
openssh-server \
openssh-client \
apt-utils \
gcc \
unzip \
gfortran \
g++ \
build-essential \
software-properties-common

RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - openmpi@4.1.4 +legacylaunchers" \
&& echo " - pmix@4.2.2" \
&& echo " - lammps +mpi +openmp +reaxff" \
&& echo " concretizer:" \
&& echo " unify: true" \
&& echo " config:" \
&& echo " install_tree: /opt/software" \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml

RUN cd /opt/spack-environment \
&& git clone --depth 1 --branch v0.22.1 /~https://github.com/spack/spack.git \
&& . spack/share/spack/setup-env.sh \
&& spack env activate . \
&& spack external find openssh \
&& spack external find cmake \
&& spack install --reuse --fail-fast \
&& spack gc -y

# Modifications to the environment that are necessary to run
RUN cd /opt/spack-environment \
&& . spack/share/spack/setup-env.sh \
&& spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh

WORKDIR /opt
EXPOSE 22

FROM ubuntu:22.04

COPY --from=builder /opt/spack-environment /opt/spack-environment
COPY --from=builder /opt/software /opt/software
COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install --no-install-recommends \
ca-certificates \
openssh-server \
openssh-client \
dnsutils \
curl \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Finally, install oras for saving artifacts
RUN export VERSION="1.1.0" && \
curl -LO "/~https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz" && \
mkdir -p oras-install/ && \
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/ && \
mv oras-install/oras /usr/local/bin/ && \
rm -rf oras_${VERSION}_*.tar.gz oras-install/
Loading

0 comments on commit b18eef3

Please sign in to comment.