diff --git a/dockerfiles/manylinux-lm/Dockerfile b/dockerfiles/manylinux-lm/Dockerfile index d9905f6..fbf733b 100644 --- a/dockerfiles/manylinux-lm/Dockerfile +++ b/dockerfiles/manylinux-lm/Dockerfile @@ -1,19 +1,16 @@ FROM registry.gitlab.com/libmultiscale/manylinux:latest MAINTAINER Guillaume Anciaux SHELL ["/bin/bash", "--rcfile", "/etc/profile", "-l", "-c"] -RUN cd /softs/ && git clone https://gitlab.com/epfl-lsms/spack-packages -COPY repos.yaml /softs/spack/etc/spack - RUN /softs/spack/bin/spack add libmultiscale@lammps_2020 build_type=MinSizeRel ^akantu@master+mpi external_solvers=mumps RUN /softs/spack/bin/spack install && \ /softs/spack/bin/spack gc -y RUN strip -s /softs/view/lib64/libakantu.so* VOLUME /io WORKDIR /io #ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"] diff --git a/dockerfiles/manylinux/Dockerfile b/dockerfiles/manylinux/Dockerfile index 8390705..fcb4b28 100644 --- a/dockerfiles/manylinux/Dockerfile +++ b/dockerfiles/manylinux/Dockerfile @@ -1,55 +1,56 @@ FROM quay.io/pypa/manylinux2010_x86_64 as builder MAINTAINER Guillaume Anciaux RUN yum install -y xz zlib-devel # What we want to install and how we want to install it # is specified in a manifest file (spack.yaml) RUN mkdir -p /softs/spack-environment COPY spack.yaml /softs/spack-environment RUN adduser -u 1000 -s /bin/false app RUN mkdir -p /softs && chown -R app:app /softs USER app RUN cd /softs && git clone https://github.com/spack/spack.git - +RUN cd /softs && git clone https://gitlab.com/epfl-lsms/spack-packages +COPY repos.yaml /softs/spack/etc/spack COPY packages.yaml /softs/spack/etc/spack # Install the software, remove unnecessary deps RUN /softs/spack/bin/spack -e /softs/spack-environment install --fail-fast && \ /softs/spack/bin/spack gc -y # Strip all the binaries RUN find -L /softs/view/* -type f -exec readlink -f '{}' \; | \ xargs file -i | \ grep 'charset=binary' | \ grep 'x-executable\|x-archive\|x-sharedlib' | \ awk -F: '{print $1}' | xargs strip -s USER root # Bare OS image to run the installed executables FROM quay.io/pypa/manylinux2010_x86_64 RUN adduser -u 1000 -s /bin/false app COPY --from=builder /softs/spack /softs/spack COPY --from=builder /softs/spack-environment /softs/spack-environment COPY --from=builder /softs/software /softs/software COPY --from=builder /softs/view /softs/view # RUN chown -v -R app:app /softs # Modifications to the environment that are necessary to run # ENV PATH="/opt/python/cp35-cp35m/bin/:${PATH}" RUN cd /softs/spack-environment && \ /softs/spack/bin/spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh RUN mkdir -p /build && chown app:app /build RUN yum install -y zlib-devel # USER app #ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"]