diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a16acd6739d55c036858829f9acf6e8ac6c41566..21f142d400294a0cc78be2ab03b5f8c363f1b5d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,6 @@ eic_builder_singularity: - sodium dind only: - tags - - develop when: manual script: - cp containers/builder/eic_builder.def . @@ -50,7 +49,6 @@ eic_singularity: - sodium dind only: - tags - - develop script: - cp containers/release/eic.def . - /bin/bash .gitlabci/setup.sh diff --git a/containers/builder/Dockerfile b/containers/builder/Dockerfile index 6307dd6793a9c5e7eb7b88fd8661d8aa8d1e18b7..95d0ea10f671f65a1fbf8aab542fab42c94eb215 100644 --- a/containers/builder/Dockerfile +++ b/containers/builder/Dockerfile @@ -49,6 +49,11 @@ RUN find -L /opt/view/* -type f -exec readlink -f '{}' \; | \ # Modifications to the environment that are necessary to run RUN cd /opt/spack-environment && \ - spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh - -ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"] + spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh && \ + echo "export BINARY_TAG=x86_64-linux-gcc9-opt" >> /etc/profile.d/z10_spack_environment.sh + +## make sure we have the entrypoints setup correctly +ENTRYPOINT [] +CMD ["bash", "--rcfile", "/etc/profile", "-l"] +USER 0 +WORKDIR / diff --git a/containers/release/Dockerfile b/containers/release/Dockerfile index 759dcf12d1cae4cc79acb3dfd588903989be2ea0..ab677c9c14908c2490df2698b0228a94e0fa7319 100644 --- a/containers/release/Dockerfile +++ b/containers/release/Dockerfile @@ -24,6 +24,11 @@ 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 +## Setup global bashrc, useful for singularity COPY --from=builder /root/.bashrc /etc/bash.bashrc -ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"] +## make sure we have the entrypoints setup correctly +ENTRYPOINT [] +CMD ["bash", "--rcfile", "/etc/profile", "-l"] +USER 0 +WORKDIR / diff --git a/deploy.py b/deploy.py index 0f9a01db3fb0cc40cf0e2e10d266845fb4d55850..43b998050fa23bee1b485d7f1e812541191b49de 100755 --- a/deploy.py +++ b/deploy.py @@ -92,14 +92,14 @@ if __name__ == "__main__": ## Create our install prefix if needed and ensure it is writable args.prefix = os.path.abspath(args.prefix) if not args.module_path: - args.module_path = '{}/etc/modulefiles'.format(args.prefix) + args.module_path = os.path.abspath('{}/../../etc/modulefiles'.format(args.prefix)) print('Install prefix:', args.prefix) print('Creating install prefix if needed...') bindir = '{}/bin'.format(args.prefix) libdir = '{}/lib'.format(args.prefix) libexecdir = '{}/libexec'.format(args.prefix) root_prefix = os.path.abspath('{}/..'.format(args.prefix)) - moduledir = '{}/etc/modulefiles/{}'.format(root_prefix, PROJECT_NAME) + moduledir = '{}/{}'.format(args.module_path, PROJECT_NAME) for dir in [bindir, libdir, libexecdir, moduledir]: print(' -', dir) smart_mkdir(dir)