| 1 |
# SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors |
| 2 |
# |
| 3 |
# SPDX-License-Identifier: Apache-2.0 |
| 4 |
|
| 5 |
ARG baseos=ubuntu-bionic |
| 6 |
FROM ornladios/adios2:spack-dependencies-${baseos} |
| 7 |
|
| 8 |
# Install adios |
| 9 |
RUN spack install \ |
| 10 |
-v -j$(grep -c '^processor' /proc/cpuinfo) \ |
| 11 |
adios2 && \ |
| 12 |
spack clean -a |
| 13 |
|
| 14 |
# Build the environment |
| 15 |
RUN spack env create --without-view adios2 && \ |
| 16 |
spack -e adios2 add $(spack find --format "/{hash}") && \ |
| 17 |
spack -e adios2 install && \ |
| 18 |
rm -rf /root/.spack && \ |
| 19 |
spack env activate adios2 && \ |
| 20 |
spack env deactivate && \ |
| 21 |
spack -e adios2 env loads |
| 22 |
|
| 23 |
# Initialize the first-use-of-environment stuff for the adios user |
| 24 |
WORKDIR /home/adios |
| 25 |
USER adios |
| 26 |
RUN spack env activate adios2 && \ |
| 27 |
spack env deactivate && \ |
| 28 |
echo "source /opt/spack/share/spack/setup-env.sh" >> ~/.bash_profile && \ |
| 29 |
echo "module use ${SPACK_ROOT}/share/spack/modules/linux-ubuntu18.04-haswell" >> ~/.bash_profile && \ |
| 30 |
echo "source ${SPACK_ROOT}/var/spack/environments/adios2/loads" >> ~/.bash_profile |
| 31 |
|
| 32 |
ENTRYPOINT [] |
| 33 |
CMD ["bash", "--login"] |