diff --git a/google/laghos/Dockerfile b/google/laghos/Dockerfile index 2e3c173..4b4090e 100644 --- a/google/laghos/Dockerfile +++ b/google/laghos/Dockerfile @@ -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 @@ -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 diff --git a/google/stream/Dockerfile b/google/stream/Dockerfile index ccccbf9..04e9e74 100644 --- a/google/stream/Dockerfile +++ b/google/stream/Dockerfile @@ -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 \ @@ -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/ && \ @@ -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 && \ diff --git a/spack/amg2023/Dockerfile b/spack/amg2023/Dockerfile new file mode 100644 index 0000000..c81b5c1 --- /dev/null +++ b/spack/amg2023/Dockerfile @@ -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/ diff --git a/spack/kripke/Dockerfile b/spack/kripke/Dockerfile new file mode 100644 index 0000000..e27d014 --- /dev/null +++ b/spack/kripke/Dockerfile @@ -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/ diff --git a/spack/laghos/Dockerfile b/spack/laghos/Dockerfile new file mode 100644 index 0000000..58d9f03 --- /dev/null +++ b/spack/laghos/Dockerfile @@ -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/ diff --git a/spack/lammps/Dockerfile b/spack/lammps/Dockerfile new file mode 100644 index 0000000..1708b96 --- /dev/null +++ b/spack/lammps/Dockerfile @@ -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/ diff --git a/spack/minife/Dockerfile b/spack/minife/Dockerfile new file mode 100644 index 0000000..6b492a9 --- /dev/null +++ b/spack/minife/Dockerfile @@ -0,0 +1,80 @@ +FROM ubuntu:22.04 AS builder +ENV DEBIAN_FRONTEND=noninteractive + +# Build command +# docker build -t ghcr.io/converged-computing/ensemble-minife:spack . +# docker push ghcr.io/converged-computing/ensemble-minife: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 " - minife" \ + && 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/ diff --git a/spack/osu/Dockerfile b/spack/osu/Dockerfile new file mode 100644 index 0000000..56069d5 --- /dev/null +++ b/spack/osu/Dockerfile @@ -0,0 +1,80 @@ +FROM ubuntu:22.04 AS builder +ENV DEBIAN_FRONTEND=noninteractive + +# Build command +# docker build -t ghcr.io/converged-computing/ensemble-osu:spack . +# docker push ghcr.io/converged-computing/ensemble-osu: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 " - osu-micro-benchmarks" \ + && 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/ diff --git a/spack/quicksilver/Dockerfile b/spack/quicksilver/Dockerfile new file mode 100644 index 0000000..ec1fa9c --- /dev/null +++ b/spack/quicksilver/Dockerfile @@ -0,0 +1,80 @@ +FROM ubuntu:22.04 AS builder +ENV DEBIAN_FRONTEND=noninteractive + +# Build command +# docker build -t ghcr.io/converged-computing/ensemble-quicksilver:spack . +# docker push ghcr.io/converged-computing/ensemble-quicksilver: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 " - quicksilver +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/ diff --git a/spack/stream/Dockerfile b/spack/stream/Dockerfile new file mode 100644 index 0000000..4a51eec --- /dev/null +++ b/spack/stream/Dockerfile @@ -0,0 +1,80 @@ +FROM ubuntu:22.04 AS builder +ENV DEBIAN_FRONTEND=noninteractive + +# Build command +# docker build -t ghcr.io/converged-computing/ensemble-stream:spack . +# docker push ghcr.io/converged-computing/ensemble-stream: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 " - stream" \ + && 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/